Logo Platform
logo amplifiers simplified

Assorted modding questions

Reply
Copied to clipboard!
10 years ago
May 13, 2015, 12:45:53 PM
Hello again,

First, about the regen, I suspect that you took a file in public file as a reference that was wrong at the time.

Something to do with UnitRegen at 0 but I cannot verify at this time.



Then, some answers:



is it possible to modify the stats of an army engaged in a siege? I want to add upkeep costs and lower regen of attacking armies.

I don't think this can be done through xml/simulation only just for the reason that we cannot know through the system if an army is under siege or not. I will ask for confirmation though.



Can the amount of food stockpile needed to add population be modified, as well as the consumption per population? I'd like to change the scaling globally, and later on make faction traits for them.

In SimulationDescriptors[Booster].xml you can change all the values of Food, Industry or Science provided by booster.



Could trade routes be made to provide A: industry under circumstances, and B: strategic or luxury resources under circumstances?

Providing industry should be similar to dust or food. Strategic or luxury might be possible but much more complicated. It will require investigation to know how to make it work.

However the "under circumstances" sounds like something not feasible. There is no "get X Industry if trade route Y is giving more than Z Dust".
0Send private message
9 years ago
May 28, 2015, 11:51:47 AM
So I found that fast trader and mechanical exhibitionist hero skills list +1 dust/science per trade route on city, and wanted to see how they worked to make use of 'per trade route' for my other issues. But this effect isn't in the xml files. Does it actually exist?
0Send private message
10 years ago
May 21, 2015, 10:14:55 PM
It's purely for use as an if/else comparison for factions. I'm trying to make faction-specific improvements(and buroughs), and they would be wildly unbalanced in some cases if different factions captured cities with them built. Since I can't get the computer to raze anything, I'm trying to disable everything via faction trait checks. I just need 0 and 1 to work.



The only other thing I might use it with are hero skills.
0Send private message
10 years ago
May 21, 2015, 9:47:03 PM
Uhm.., maybe we could try another approach..



What is the objetive of that new property? do you want it like a fixed value for each faction? or do you want to use it outside faction traits?
0Send private message
10 years ago
May 21, 2015, 6:59:36 PM
The improvements line is



and it displays properly(well, it properly displays an improperly localized %scorchedearth string). It just appears that the parameter isn't being effected by the faction trait, or that modification isn't properly being passed to the city, even though I've put it with the other city parameters.



I had neglected to test if it worked with base=1, and it doesn't. So something is wrong with the defining or the path, so a city is always calling up a 0 without regard to the parameter being changed or not.
0Send private message
10 years ago
May 21, 2015, 6:20:25 PM
True..



Have you tried with a starting value greater than 0



Which is the formula into the improvementes file?
0Send private message
0Send private message
10 years ago
May 21, 2015, 4:43:17 PM
So PropertyDescirptor is into EmpireType file, isn't it?, because I haven't found any EmpireTypeMajor file..



Have you tried removing "Major" from Path?
0Send private message
10 years ago
May 21, 2015, 2:55:49 PM
Updated OP again.



For my first question, I have half of the solution working. I made the founder's memorial provide food based on some property X, which has a default value of 0. But I haven't been able to set it to 1 through a faction trait.

its definition:



What i tried in factiontraits:







What am I doing wrong here?
0Send private message
10 years ago
May 15, 2015, 1:09:48 PM
Ok so there is a Registry.xml file in public folder.

The GrowthFormula line 24 should have an impact on when you get your knew population according to a certain amount of food stocked.

I hope it helps.

Cheers,
0Send private message
10 years ago
May 13, 2015, 4:51:08 PM
I was unclear(forgot food stockpiles were a thing), I mean I want to change the value that determines the size of the progress bar towards cities gaining population. I want to be able to change how fast population changes, without altering where it will eventually equilibrate, which altering food production would do.



EDIT: figured out why regen isn't working, though. In simulationdescriptors[class], line 833, unitregenmodifier was not present in the older public folder files that I based my mod on. Some patch put it in at some point afterward.
0Send private message
10 years ago
Apr 22, 2015, 6:11:36 PM
I just got EL over the weekend sale, and after playing quite a bit the last few days I must now start modding. So, a few more questions.



Something probably impossible: could I make a faction's cities automatically raze themselves if captured(like cultists in reverse), or have faction-specific improvements that raze/disable themselves when controlled by a different faction? I had the idea of a property of base=0, set to 1 by a certain faction, and if I multiplied all the improvement benefits by that property it would only benefit that faction. Would this work?



What's all the 'infiltration' code doing? Is this for an upcoming expansion/update, and can I take advantage of it now? It looks like it can provide vision and intel on garrisons.



I can't figure out how to create a unit capacity that isn't based on a vanilla one. I can make a different version of forest rage, but I seem to have no ability to create new effects, like life on hit that scales with damage, or give a unit attacks which do not get counterattacked. Most of the interesting ones appear hard-coded, and the rest are just stat bonuses I can add to units as default or directly to items. Am I missing something here?



Could trade routes be made to provide food, industry, and influence? It looks like it's possible, i just have no idea how to go about it. If someone in the know could walk me through it, i'd be grateful.

Could the same be done for strategic or luxury resources? Ideally, I want the target city to give a portion of resources as a bonus to the origin city, but I realize that is almost certainly impossible. I'd settle for generation of random resources.

and for both of these, is there any way to get the number of active trade routes per city? Although I'm hoping for a better solution, I could just give a bonus to FIDSI or resource generation based on the current number of routes, but I can't find what that property is.





Answered questions:

Can I change the base vision for units?

In simulationdescriptors[unitclass] on a unit type basis.



Does anyone happen to know if the calculation for fortification loss on siege is in the moddable xml files, and where it can be found if it exists?

The calculations are in simulationdescriptors[class], lines 955 and 956.



Can I change the number of turns battles last? Additionally, could this be modified by unit/faction traits?

Phases can be modified in battlesequences.xml, but cannot be altered by unit or faction traits.



Could it be possible to stop units from moving through each other in combat? Could units be made to attack enemies that leave adjacent hexes?

No, additional interactions cannot be added as combat actions are hard-coded.



Is the calculation for equipping heroes with new items modable?

The formula that controls retrofitting of both heroes and existing units is in resourceconverterdefinitions, line 15.



Can the amount of 'population stockpile' needed to add population be modified?

The growth formula for population is in registry.xml, line 24.



Is it possible to modify the stats of an army engaged in a siege?

No, as there is no way to detect if an army is involved in a siege with the xml modding capability.
0Send private message
10 years ago
May 10, 2015, 10:49:47 PM
I updated the OP again with more answers and questions.



I also have an issue: no units are regenerating on the map, not even necrophages. It only happens with my mod activated, but I can't find anything dealing with regen that i've changed. Does anyone have any ideas about it, because i'm stumped.
0Send private message
10 years ago
May 6, 2015, 3:25:51 PM
I think I have it working now. It was crashing when I tried setting the mod to standalone(probably from the recent update+ my older files), so I tried shenanigans to cancel out the default level scaling. Eventually I just put the original line back in place and changed it to a subtraction, which has actually appeared to work as it should.
0Send private message
10 years ago
May 5, 2015, 9:04:48 AM
Ok so maybe it might be interesting to have access to your mod in order to help you with more precision.

Just for info, one of our "simulation" expert is currently out of the office and you may have a proper answer in around 2 weeks.

But I hope we will find a way to do what you expect before this time smiley: smile
0Send private message
10 years ago
May 4, 2015, 5:23:42 PM
Well it did something. But i tested it and now i'm trying to find out how a lv 3 hero and 2 lv 1 infantry can result in 11 fortification loss per turn.The old formula should give 8, the new should have 6, but 11 makes no sense at all. Unless for some reason the default +1 per unit in my XML is being added to the +1 per unit vanilla, and the new level math doesn't work. I don't know what's going on here.



EDIT: so the infantry leveled up, and now the fort damage is at 14. It's currently doing 1+1.5lv per unit. The new formula line is indeed being added, not replacing the old one, while the base value is not, likely because it is unmodified. I guess I have to set the mod to replacement rather than conversion.
0Send private message
10 years ago
May 4, 2015, 9:31:46 AM
Hello,

If you want to make a multiplication the right formula here should be:



Path will depend on where you want to put your effect.

And there is also a parameter called "IsBindOnSource" that can be written at the end. It defines where the property Value is computed. Default value is true, which means the Value is computed from the source object. If false, the Value is computed from the target object defined by the path.

I hope it will help!
0Send private message
10 years ago
May 1, 2015, 2:58:50 AM
I found the fortification damage lines, but it seems i don't know how to do math operations in this system. This:



outputs zero in all cases, and trying to put the multiplication inside the bracket with or without "value" instead of interpreterformula will return the unit's level in all cases. What's the proper syntax for multiplication?



Yeah, while looking through the files I found plenty of code blocks dealing with food from trade that looked like a scrapped feature, but I couldn't actually get it to work. There's probably a lot of lines I need to do from scratch or something.



Sad face on inability to mod anything with unit movement.
0Send private message
10 years ago
Apr 30, 2015, 8:56:53 AM
Hello there,

I will try to help my best on those various subjects.

I'm currently preparing a small update of the tutorial and I think I will try to give examples to some of your questions smiley: smile

First things first.



Does anyone happen to know if the calculation for fortification loss on siege is in the moddable xml files, and where it can be found if it exists? The current math allows a deathstack to roll over cities with no trouble at all.

> Just look at SimulationDescriptors[Class].xml and then search for CityDefensePointLossPerTurn. You will see that in ClassArmy the base value from units (0) has an addition of 1 + the current level. If you want to increase the loss you will have to change those values.



Is the calculation for equipping heroes with new items moddable? I'd like industry to be converted to dust cost at a higher rate.

> The calcul is bound to the formula line 15 in ResourceConverterDefinitions.xml. However, it will also impact the retrofit cost of units...



Can I change the number of turns battles last? Additionally, could this be modified by unit/faction traits?

> You can please yourself in BattleSequences.xml. It should be easy to understand/test/change. Not possible to modify that with a trait or unit however. It must remain coherent between all players.



Could it be possible to stop units from moving through each other in combat? Positioning doesn't mean much when manouvering is easy and free.

Could units be made to attack enemies that leave adjacent hexes? Same reason as above.

> Changing the way a battle evolves in itself is an entirely different matter. This is the part of the game which is the most difficult to change to be honest. And it always requires code, not only xml.



Could trade routes be made to provide A: industry under circumstances, and B: strategic or luxury resources under circumstances?

> Trade routes can provide industry and food and influence (exactly the same way it provides science and dust in SimulationDescriptors[Class].xml). For resources it should be possible too but a bit more complicated as it will require you to create a lot of new properties.

I will try to make a chapter about trade routes in the modding tutorial.
0Send private message
10 years ago
Apr 22, 2015, 10:45:03 PM
Well I did find base vision stats through a directory search, so one question down. I also happened to find other siege math through the same method, but not the one I wanted. simulationdescriptors[class] has a line that allows you to change the ratio of siege fortification damage into damage to garrison. Useful, but not the goal.



While directory searching for trading, I found that most blocks of code had sections dealing with food income from trading commented out, so i'm now very sure that industry and food can be gained through trading in some way. But i'm too new to this style to figure out how it works and put a working system in place at the moment.



and I added a question on battle turn length to the OP, because I couldn't find that either.
0Send private message
10 years ago
Apr 22, 2015, 7:22:44 PM
The most likely location for the stuff you want to alter is somewhere in the /Simulation directory, although I just did a quick overview of probable files for the edits you'd like to make and found nothing that relates to the stuff you're asking...



You should still take a peek though; probably spot something I missed.
0Send private message
?

Click here to login

Reply
Comment