Logo Platform
logo amplifiers simplified

New/Custom Army Actions

Reply
Copied to clipboard!
9 years ago
Nov 29, 2015, 10:24:09 PM
While working on my conversion mod, I tried to add a new technology that's working like the current Pillage technology of Era 1. It's suppose to add a new Army Actions. Since there is no tutorial and I couldn't find the typical GUI and Simulator xml files associated with ArmyActions, I'm wondering if it's even possible to modify or add custom Army Actions with what Amplitude is giving us in the public folder at the moment. I'm still not an expert in modding, but I've done quite a few things and we're kinda limitated.



If you have any idea what are the steps to achieve this, let me know smiley: smile



Thanks!
0Send private message
9 years ago
Nov 29, 2015, 10:53:06 PM
Hi,

There is something in PathfindingRules.xml

and in PathfindingRules[TerrainType].xml

I thinked about create a tech/capacity giving more movement on sea (but i don't work on that for now).



In this file, it's possible to define rules about movement, cost, stopable or not.

PathfindingRules[TerrainType].xml say what are standard rules and cost.

And in PathfindingRules.xml, there is the "RuleOverride" saying how the standard rule must change with a capacity.



EDIT : i'm wrong,

after more read, it look like there is a description of Rules, and inside a rule, the "RuleOverride" says if something get the capacity, then the rule will be this.



Example :

[CODE]





[/CODE]



The in-commentary line MovementCapacity="Air is here maybe because at first game designers wanted made the "Air" capacity capable to go on water.

DefaultCost="Infinity" : nothing can travel here

except :

Someting with capacity "Water", and then cost is 1.

But I don't find where this capacity is defined.
0Send private message
9 years ago
Nov 30, 2015, 12:43:16 AM
Mmmh, that's good to know. I guess the flying units becomes ships now and moves on water like the others.



Your idea about the movement on sea is cool, but what about a capacity that makes you able to fish with your ships. I already tried that with a new technology adding a new Army Actions in the same way Pillage is doing it, but it didn't work out so well (crashed the game everytime). What I did is copied everything related to Pillage but changed a couple of things including the fact that you can only toggle the button if you're on water. It's just not working. Maybe, It could be possible to go add a new Army Actions in the ArmyActions.xml that is in the simulation folder. Problem is that this doesn't tell the image that refer to the actions. Also, it doesn't tells where's the button in the HUD and the description/effects of it.



If we take for example Pillage, here is the code in the ArmyActions.xml:

[CODE]

TechnologyMapActionPillage

ClassArmy/MovementCapacitySail

[/CODE]



It's only specifying the conditions in order to do the actions Pillage(where is the conditions to have a PointofInterest nearby?), but not the effect or the description of it. If we take the code line by line, I know where the TechnologyMapActionPillage is, but where is the GUI or anything related to the name=ArmyActionPillage? I feel like I'm repeating myself here. I just hope you understand what I'm saying(my english can be kinda bad sometimes).



I think I'm just missing something...



EDIT: I found something interessting when reading the extratype of the ArmyAction database.



[CODE]













































[/CODE]



Maybe that means there is literally an extratype of database for each ArmyAction. If that is the case, It is really impossible to make a new ArmyAction unless I can make a new ExtraType which I have no idea how It's done.
0Send private message
9 years ago
Nov 30, 2015, 10:13:50 AM
Probably, the armyaction end to a point it need to be hardcoded. There is some dead end in xml.



But with the xml, it should be possible to try some stuff, because you can also use your own descriptors.

There is many things I don't masterize here.

If you would need to do it, first, i would do some very simple tests.

How to add a new army_movement for example, with a very simple effect.

How to add an ability to units from a technology. I know how to add bonus to defense, attack or thing like that, but don't know how to add an ability.

Or try something like "if unit is on a water tile, then add +X to cityfood".

The last proposition need to be study carefuly. I don't know if it's possible to do a simulatordescriptor like that. Because I tried may descriptors, and didn't succed to do it when "path" is not the same thematic of the property benefit. And a "terraintag", like "TerrainTagWater" is usualy in a classcity path.



It's very interessting, I probably will need to do things like that, but I'm working step by step. First how work traits , world generator, season, techs, and now i'm focused on AIParameters.



edit: On water there is no city, so city food can't be added. Probably, it need to be a "booster". So the ability should work like the necrophagist one.
0Send private message
9 years ago
Dec 3, 2015, 2:25:38 AM
just a thought but maybe you could make it so fishing gives food stockpiles? that would kinda make sense to me anyways since you could send the fish to whatever city you wanted to give the food to? not sure if this is something you thought of, or if it actually makes things more complicated instead of less.
0Send private message
?

Click here to login

Reply
Comment