How to mod....

Question

King
Joined
Mar 12, 2008
Messages
950
Weather satellites/orbital fabricators so that they can spawn resources in improved tiles? I cant find any files that contain the relevant code...
 
Hmm i tried changing MIN_CIV_STARTING_DISTANCE in global defines to 15, but civs are still starting within 10 tiles of my starting location....does anyone know how to set the min starting distance?

And is there a way to mod things so that you can make a city within 3 tiles of a station but NOT another city?
 
Also trying to figure out where the quest rewards are stored. Im looking at the hostile takeover lua...

-- If the quest and objective station are the same, then we have succeeded.
if objective.PersistentData.TargetStationType == quest.PersistentData.TargetStationType then
quest.PersistentData.RivalDestroyed = true;

objective:SetEpilogue(Locale.Lookup("TXT_KEY_QUEST_STATION_HOSTILE_TAKEOVER_EPILOGUE"));

local pOriginStation = GameInfo.Stations[quest.PersistentData.OriginStationType];
quest:SetReward(Locale.ConvertTextKey("TXT_KEY_QUEST_STATION_HOSTILE_TAKEOVER_REWARD", pOriginStation.Description, REWARD_TURN_DURATION));

-- TODO: Apply trade yield buff to player

-- Succeed!
quest:Succeed();

return BehaviorStatus.SUCCEEDED;
end

But i dont see anything that actually gives the trade yield buff...
 
For the two orbital units there check this out:

C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization Beyond Earth\assets\Gameplay\XML\Units\CivBEOrbitalUnits.xml

Also it seems that other parts of the Orbital Unit info is stored in the general Units.xml

You might have to add some lua and then add another column to the table that allows for the resources to be spawned on improved tiles as I don't see anything like that.

And heh, having my own issues with getting a new orbital unit to even show up in the game...
 
Unfortunately the xml file only includes basic info, it doesnt include the resource spawning mechanics. The closest thing it has is that the xml file defines the min/max resources a satellite can spawn but doesnt contain the code for spawn rate chances or the part that will only spawn resources on unimproved tiles.
 
hi guys,

regarding the quest rewards:
The one you cite looks underimplemented compared to other quests (They commented it with "ToDo:" for a reason apparently). Even in the Quests that make more sense to read though, it's an inconclusive mess. I'd guess most of it is implemented in the dlls.

regarding the orbital resource spawning:
It looks like that's implemented in this file:
[GameDir]\assets\Gameplay\Lua\PlotBonuses\SpawnStrategicResourcePlotBonus.lua

The Unimproved tile only specification appears to come from this line:
Code:
if (plot:CanHaveResource(resourceID, ignoreLatitude)) then

How often the spawning function is called is probably dependant on the Xml though.

Cheers,
Bosparan
 
Theres nothing in the xml files that control the spawning chance from what i can see though, other than the min/max spawns available.

Does anyone know how to edit the tech tree? I cant find anything that controls where the leafs are positioned, which is weird....the xml file only includes leaf tech costs, but does not determine the positioning or pre-reqs...
 
Also i noticed that the affinity icons in the tech tree are NOT controlled by whether they give any affinity xp...in other words you can remove the xp and the icons will stay.

Does anyone know what controls the location of the icons?
 
Also doe sanyone know how the mag rail production bonus works? I want it to apply to capitals as well...its weird that the capital gets less production from it.
 
Top Bottom