Author Topic: Helping out with External Code  (Read 299 times)

Offline BadgerBadger

  • Full Member Mark II
  • ***
  • Posts: 193
  • BadgerBadgerBadgerBadger
Helping out with External Code
« on: March 18, 2017, 02:03:43 PM »
Hey Keith/Chris,
     I'm feeling bored today and I'm wondering if there are any small coding pieces that can exist purely in the Externally Moddable code that people in the community could write for you guys, on a purely volunteer basis.

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 18,995
Re: Helping out with External Code
« Reply #1 on: March 18, 2017, 02:17:17 PM »
The main things that come to mind for helping with development itself are UI stuff (refinement of the existing, replacement of the existing, new bits entirely) and balance analysis/changes. Both of those are pretty much wide open in the external code. But neither of those is to the point where you wouldn't be subject to it all going poof fairly soon anyway.

The AI will also be exposed more in external code later, but not much of it is there yet.

There's also turret patterns, but that's largely based on balance and UI considerations.

So if you're bored I'd suggest adding a new map type based on some pattern or algorithm you find interesting. You could start with changing an existing one, and then move to creating a new one from scratch (probably by copying one and replacing the innards).

Thanks for your interest :)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Full Member Mark II
  • ***
  • Posts: 193
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #2 on: March 20, 2017, 04:53:08 PM »
I will look into the map generation code as I get the chance.

Also, on another vein of helpfulness, if you have "interesting scenarios" that need to get checked out, feel free to request people to try things in particular. If we can get people in the forums to test things then there's no need for you to do it in person, given that your time is more valuable

Offline BadgerBadger

  • Full Member Mark II
  • ***
  • Posts: 193
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #3 on: April 15, 2017, 12:59:23 AM »
So I was actually poking around in the MapGenerator code, and I note that each IMapGenerator takes a "numberToSeed", which seems to be the number of planets. However, we don't have a means of controlling that from the start of the game, which makes it hard to experiment properly.

I would add a drop down menu or something to Window_GameSetup.cs for my testing purposes, but I don't see exactly how to pass that information along to the map generator. My guess is that you should be able to get that information into a WorldSetup object, but my attempts to disassemble ArcenAIW2Core.dll to see check the variable for that have failed. If I asked nicely, could you tell me the name of the value in WorldSetup to set to allow me to tweak the number of planets? Or is that not implemented yet.

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 18,995
Re: Helping out with External Code
« Reply #4 on: April 15, 2017, 09:34:38 PM »
Setting planet count isn't supported yet. I'm trying to avoid multiplying balance variables until after there's a real balance to vary.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Full Member Mark II
  • ***
  • Posts: 193
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #5 on: April 15, 2017, 10:33:35 PM »
You're totally right, but could I persuade you to put ina "NumberOfPlanetsOnMap" into WorldSetup for silly people like me so I don't have to hardcode my test values in? You don't have to put the gui elements in (so it won't confuse others), I already wrote that for myself before I realized that StartingPlanetIndex wasn't what I was hoping it might be.
« Last Edit: April 15, 2017, 10:38:28 PM by BadgerBadger »

Offline tadrinth

  • Sr. Member Mark II
  • ****
  • Posts: 412
Re: Helping out with External Code
« Reply #6 on: April 24, 2017, 05:16:15 PM »
*Goes to code for Encapsulated and changes rim planet percentage param from 0.40 to 0.25*

I always thought Encapsulated maps would be more interesting if the rim acted more like a superhighway with very few nodes. Now I can try that out!

As soon as I put Visual Studio on my desktop so I can compile the external code project, anyway. 

Offline tadrinth

  • Sr. Member Mark II
  • ****
  • Posts: 412
Re: Helping out with External Code
« Reply #7 on: April 25, 2017, 01:18:38 PM »
So I was actually poking around in the MapGenerator code, and I note that each IMapGenerator takes a "numberToSeed", which seems to be the number of planets. However, we don't have a means of controlling that from the start of the game, which makes it hard to experiment properly.

In the map generator methods, you can just assign whatever value you want to numberToSeed.  You can even generate a random number of planets by using Context.QualityRandom.  That way, you can randomize the seed repeatedly in-game and see the different results.

Offline BadgerBadger

  • Full Member Mark II
  • ***
  • Posts: 193
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #8 on: April 25, 2017, 01:28:58 PM »
You are right, but I have to close the program, then edit my code, then recompile it every time. It's inefficient.