Request: Advanced Stations

waves_blade

Chieftain
Joined
Jan 30, 2014
Messages
21
Is it possible to make a mod that:

A) Greatly increases the # of stations in a game?

B) Allow you to found cities near them (ignoring their 3 tile rule?)

C) Grant different trade bonuses:
-happiness
-Access to a strategic resource during the trade route
-Free units at the end of (or maybe even during) the trade route (Workers/Military/Colonist/Satellite)
-Other interesting gimicks?

D) Increase their max # of tiers?

And anything else awesome that anyone can think of.
 
I think and don't put much merit into what I say, that the stations are considered as a city in that they are controlled by the global defines xml with the min city range. Base value for it is set at 3.
 
I've played around with this a little myself, but not managed to achieve what I wanted to achieve yet.

I think and don't put much merit into what I say, that the stations are considered as a city in that they are controlled by the global defines xml with the min city range. Base value for it is set at 3.

When you're founding an outpost with a colonist the game does indeed treat stations the same as cities and use the min city range global define. So you can't let players found cities any closer to stations than to cities. :(

But when new stations are being spawned it instead uses three seperate global defines for MIN_STATION_RANGE_TO_CITY, MIN_STATION_RANGE_TO_OUTPOST and MIN_STATION_RANGE_TO_STATION. So you can let the game spawn new stations spawn closer to cities than colonists can build cities. (if a station spawns inside your territory you loose ownership of that tile)


I think the STATION_TO_PLAYER_DEFAULT_MAX_RATIO global define controls the total number of stations on the map, default being 2 stations per player in the game.
 
I've played around with this a little myself, but not managed to achieve what I wanted to achieve yet.

When you're founding an outpost with a colonist the game does indeed treat stations the same as cities and use the min city range global define. So you can't let players found cities any closer to stations than to cities. :(

But when new stations are being spawned it instead uses three seperate global defines for MIN_STATION_RANGE_TO_CITY, MIN_STATION_RANGE_TO_OUTPOST and MIN_STATION_RANGE_TO_STATION. So you can let the game spawn new stations spawn closer to cities than colonists can build cities. (if a station spawns inside your territory you loose ownership of that tile)

I think the STATION_TO_PLAYER_DEFAULT_MAX_RATIO global define controls the total number of stations on the map, default being 2 stations per player in the game.

Useful info, though, without being able to breech station's distance on your own, if you set it to like... 12 stations per player, there wouldn't be like any room for cities even on massive. Though, if you set station to station to 0, you could potentially get clusters of stations, which would be quite strategically important to control. A cluster of 3 stations, put units around them to cut off other people's trade routes.

Hmmm, I wonder if there is a way to scale it as your empire grows in size. Maybe get a new Station in your territory for every X cities or X population you have.
 
I've played around with this a little myself, but not managed to achieve what I wanted to achieve yet.



When you're founding an outpost with a colonist the game does indeed treat stations the same as cities and use the min city range global define. So you can't let players found cities any closer to stations than to cities. :(

But when new stations are being spawned it instead uses three seperate global defines for MIN_STATION_RANGE_TO_CITY, MIN_STATION_RANGE_TO_OUTPOST and MIN_STATION_RANGE_TO_STATION. So you can let the game spawn new stations spawn closer to cities than colonists can build cities. (if a station spawns inside your territory you loose ownership of that tile)


I think the STATION_TO_PLAYER_DEFAULT_MAX_RATIO global define controls the total number of stations on the map, default being 2 stations per player in the game.

So, I figured out how to edit those via the global thing (made a backup first), but how would I make a mod to edit those for modded games instead for all games?
 
So, I figured out how to edit those via the global thing (made a backup first), but how would I make a mod to edit those for modded games instead for all games?

- Download the modmaking tool (Beyond Earth SDK) from Steam. It's in your Steam library under "tools".

- Read Kael's very helpful Modder's Guide to Civilization V, which will tell you how to use the SDK and explain the basics of modding. (the guide is for Civ V, but it's pretty much the same procedure for BE)

- Create a new XML file in your mod, containing an Update command to find and replace the value you want to change. E.g.

Code:
<GameData>
   <Defines>
      <Update>
         <Where Name="STATION_TO_PLAYER_DEFAULT_MAX_RATIO"/>
         <Set Value="5"/>
      </Update>
   </Defines>
</GameData>

hope that's helpful to you :)
 
- Download the modmaking tool (Beyond Earth SDK) from Steam. It's in your Steam library under "tools".

- Read Kael's very helpful Modder's Guide to Civilization V, which will tell you how to use the SDK and explain the basics of modding. (the guide is for Civ V, but it's pretty much the same procedure for BE)

- Create a new XML file in your mod, containing an Update command to find and replace the value you want to change. E.g.

Code:
<GameData>
   <Defines>
      <Update>
         <Where Name="STATION_TO_PLAYER_DEFAULT_MAX_RATIO"/>
         <Set Value="5"/>
      </Update>
   </Defines>
</GameData>

hope that's helpful to you :)

Thanks, but after testing it in-game through the normal editing, I've realized it does... absolutely nothing.
Code:
<Row Name="STATION_TO_PLAYER_DEFAULT_MAX_RATIO">
			<Value>12</Value>
                </Row>

I set it to 12 Stations per player, nope, it spawned a few stations then stopped. I think each station is unique and can't have multiple of the same stations. So, either that limit needs to be removed, or I need to find a way to make more stations.
Code:
<Row Name="STATION_DEFAULT_MAX_LEVEL">
			<Value>99</Value>
		</Row>

I also set the max tier of stations to 99, didn't work. Maxed out at three, no idea why. @_@

Edit: Figured out why: Each station file has their yield level built in. So, you'd have to go through each and every station file and add in new tiers, though I am unsure if the game would actually recognize that. Why stations just don't have an automatic scaling value instead of setting it for each and every level, idk.
Code:
local TRADE_YIELDS = {
	{
		[YieldTypes.YIELD_ENERGY]		= 2,
		[YieldTypes.YIELD_PRODUCTION]	= 2,
	},
	{
		[YieldTypes.YIELD_ENERGY]		= 3,
		[YieldTypes.YIELD_PRODUCTION]	= 4,		
	},
	{
		[YieldTypes.YIELD_ENERGY]		= 5,
		[YieldTypes.YIELD_PRODUCTION]	= 5,		
	}
};

Edit #2: Found a template file. lol @faith, copy and paste from civ5 much? Though, if these are the only types a stations will give you, idk if its possible to get them to give you health. I know city-states in Civ5 could occasionally give units, so that must somehow be possible. I wonder if it would recognize [YieldTypes.YIELD_HEALTH]...
Code:
local TRADE_YIELDS = {
	[YieldTypes.YIELD_FOOD]		= 0,
	[YieldTypes.YIELD_PRODUCTION]	= 0,
	[YieldTypes.YIELD_ENERGY]		= 0,
	[YieldTypes.YIELD_CULTURE]		= 0,
	[YieldTypes.YIELD_SCIENCE]		= 0,
	[YieldTypes.YIELD_FAITH]		= 0,
};
 
- Download the modmaking tool (Beyond Earth SDK) from Steam. It's in your Steam library under "tools".

- Read Kael's very helpful Modder's Guide to Civilization V, which will tell you how to use the SDK and explain the basics of modding. (the guide is for Civ V, but it's pretty much the same procedure for BE)


Yeah.... that modder's guide thing is waaaaaaaayyy outa my league. I could do basic edits to stations, and making new station files, but I'd have 0 clue how to make a mod in itself.
 
If I were to say edit and make a few new stations and then supply the files, would someone be able to make a mod with them for me?

Though I have a question, would either of these work?

Code:
[YieldTypes.YIELD_HEALTH]     = 1
(for yeilding health in a trade)
or
Code:
[YieldTypes.YIELD_HEALTH]     = -1 work?

For negative values? If negatives work, then I have a lot of ideas for maaaaany different stations.
 
Well, I have all the current stations edited up to tier 10, gona try my hand at making a station, still looking for someone to combine all the files into a mod once done.
 
I can help integrating your database changes into a mod, but I suspect the health part will require some Lua hackery (or a DLL mod, once the source is released).

Like happiness in Civ5, health isn't a real yield, so modding it is probably going to have similar problems; Player.SetHappiness didn't accept negative numbers, and health looks like it probably behaves similarly (as health and unhealth are similarly distinct in the code), and there was no Player.SetUnhappiness.

Anyway, I'm not sure to what extent all of the equivalent functions are available (Player.SetHealth and Player.ChangeExtraHealthPerCity aren't used in the game's Lua files, but they might exist). If so, this thread's technique might prove instructive.

If you share what you have so far, I'll make an experiment.
 
Back
Top Bottom