[MOD] Italy 500BC

Chris36
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 50
Joined: Mon Mar 10, 2014 8:44 pm

[MOD] Italy 500BC

Post by Chris36 »

Hi,

i learned some stuff about scenario/modding and still learning what Cablenexus did with his first scenario and want to create another one scenario. This time with only some minor modifications just to learn more about modding and preparing for the following up scenario i got in mind.

This scenario should be mainly landbased only. At least the modifications will be focused on land, mainly in the economic and military areas.

What's this scenario about in a short overview:(there may be things added or removed)

The scenario:
Its about Italy at ~500 BC, where latins gain independence by the etruscians and Italy is devided up by several 'tribes'. I know its a similar or even the same timeframe the new scenario of Rome 2, but i dont care. Its my introduction scenario and precursor of the next one scenario relating to this time frame.

The map:
Italy + Sicily. I still need to check it what size its good for. At least it will be big. :shock:

The Tribes:
All tribes in Italy and Sicily.

The cultures:
Nothing new: Greek, Roman, Barbarian, Carthagenian

The modifications:

Economic->New Terrains:
1. Mediterran_Hills_moist
2. Mediterran_Plain_dry

Economic->Terrain->New Buildings: ( build rules: must be on your terrain )
1. Only on Mediterran_Hills_moist: Winery(which adds a little bit food to the tile its been built on)
2. Only on Mediterran_Plain_dry(rare, like only on Sicily): Olives Farm(which adds a little bit food to the tile its been built on)
3. Only on Forest: Lumberjack(which adds a little bit of wood to the tile its been built on)

* These buildings act like mines but they also influence the tile for a little bit.
* The most important role: They act as raw material supplier for another building: The Marketplace, representing a district of a city with craftsmen/manufacturers and traders.
* They can be upgraded by Levels/Improvements unlocked by tech and through other conditions on the tile like streets, rivers, sea

The Marketplace( with the build rules of a smith, within a range of 3 of any of your cities)
• can connect to the new buildings AND all mines a smith can connect with the same rules as a smith is doing with mines in vanilla.
• Can produce goods
• Generates gold
• needs to be connected/bound to a city
• needs at least LVL1 streets to start
• The smith will be removed, its role is taken over by the marketplace.
• The marketplace can be upgraded/improved with manufacturers and other improvements like a storage hall, stores, emprium under specific conditions. Greater stores of course need more different goods.
• Within the marketplace you can build only those manufacturers suitable to the raw materials the marketplace is connected to:
1. Wine for a winery( need a manufacturer name )
2. Olive oil for an olive farm ( need a manufacturer name )
3. Light Weapons for Lumberjack ( Armourer )
4. Heavy Weapons for Iron( Heavy Armourer )

• The marketplace itsself can be upgraded through inventions and other conditions, generating more income etc.
• It generates income as soon as manufactural improvements were built
• The vanilla Trading Improvement of cities will be removed

New resources and about resources:
1. Wine should be a new tradeable resource
2. Olive oil should be a new tradeable resource
3. Light Weapons arent a tradeable resource. Instead its a status condition either a country got them produced in a marketplace or not. They will be used as condition for some improvements/trainings for military units
4. Heavy Weapons. The same as light weapons

About resources:
1. Wine: Adds to happiness and loyalty of cities and armies. Cities consumes Wine.
2. Olive oil: Adds to happiness and loyalty of cities. cities consumes olive oil.
3. Light Weapons used as condition for some unit improvements
4. Heavy Weapons the same

Military tradition:
I have to work out this one a little more. Its just a value of the overall military situation of a country like the amount of armies in duty, XP of Armies and maybe other stuff. It may be a further "resource" needed - next to gold and research - to invest into some military technologies.

Economic tradition:
Similar to military tradition. It represents the overall economic situation of a country and can be used to invest into technologies regarding trade/economics. For this value come into account marketplaces and their improvement, amount of ships, ports, overall gold income....

Thats it so far.

For the next scenario i would like to go even more deeper where you can connect trade-ports to marketplaces, make even more goods, expand the marketplace, seperate the people into normal burghers and rich, 1 more military unit, world wonders and effects on neighbouring tiles like on armies or on the tile itsself through increased morale of the people and more workforce in those tiles, ....... theres a long list :D

ToDO:
• I still have to workout and go into detail with with rules, conditions etc. for every idea i had
• ask pavelk: is something of my ideas of this scenario not possible to do?
• Maybe someone is interested to join up? would be amazing to start something with more people . :)


Cheers
Last edited by Chris36 on Thu Aug 23, 2018 2:41 pm, edited 1 time in total.
gwgardner
Lieutenant-General - Nashorn
Lieutenant-General - Nashorn
Posts: 3471
Joined: Mon Jun 09, 2008 2:59 am

Re: [Modding]A first scenario and little bit of modding

Post by gwgardner »

Impressive. I'm sure you'll have fun creating it, and us playing it!

Never heard of Rome 2 scenario, what's that?
Cablenexus
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1691
Joined: Mon Jan 04, 2016 7:09 pm

Re: [Modding]A first scenario and little bit of modding

Post by Cablenexus »

Hi Chris,

I'm very busy creating all kind of guides in Steam Workshop and I'm also creating some MOD prototype templates and raster images with texture coordinates for easy reference etc.

It's extremely helpful if you follow the prototype mod guide or the video that Pavel made earlier (link mentioned in the mod guide).

I will collect all the material in my Dropbox now till the Steam release is accessable for everyone here:

https://www.dropbox.com/s/8044vbj59bsph ... e.rar?dl=0

It contains an empty mod template with created directories and some images as a reference (texture coordinates etc).
I'm constantly updating it, after august 30 it's available on Steam.

Before Steam release I want to keep working on my own mod and on the guides to help new modders directly at release.
You can always ask me everything here in the forum and I try to answer. To cooperate for a new project I don't want to decide before release yet, but I'm open to it.

Beware that adding your own unit models is advanced stuff. I would start to mod this only if you can manage to create the mechanism with the existing models as an example.
(Again ask if something is not clear).

Seems like a very interesting project you are starting, good luck with it!
Chris36
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 50
Joined: Mon Mar 10, 2014 8:44 pm

Re: [Modding]A first scenario and little bit of modding

Post by Chris36 »

Im sure will have fun, love that game already so much and i do love modding. Hope you got fun with the mod when its done! Regarding Rome 2: CA released a DLC Campaign "Rise of the Republic" for Total War Rome 2.

Cablenexus, im very happy and im sure any modder in the future will be damn happy as well about all those things you put together and share with us. Thats definatly information i will built along my mod, even the raster images makes things so much easier especially for me, who has no clue about grafics.
If you would join up after release it would be a pleasure!

I will start at the weekend building up the new terrains, make them available in the editor and paint that Italy/Sicily map first. Right there i got a question, do you know theres a shortcut in the editor allowing me to draw a terrain over a bigger area than one tile per click? Something like holding shift + holding left mouse constantly draw a terrain over the tile you are hovering over?
pavelk
Kubat Software
Kubat Software
Posts: 2467
Joined: Mon May 16, 2016 4:27 pm

Re: [Modding]A first scenario and little bit of modding

Post by pavelk »

Chris36 wrote: Thu Aug 23, 2018 5:19 pmRight there i got a question, do you know theres a shortcut in the editor allowing me to draw a terrain over a bigger area than one tile per click? Something like holding shift + holding left mouse constantly draw a terrain over the tile you are hovering over?
Right now there isnt. I have it in my todo list but it is actually pretty low priority. Now you really have to go one by one. Sorry about that.

What I can do for you is the same I did for Cablenexus - you create the "map bitmap" and I "export" it to the actual Aggressors map. Cablenexus, would you mind step in and explain what you did?
Cablenexus
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1691
Joined: Mon Jan 04, 2016 7:09 pm

Re: [Modding]A first scenario and little bit of modding

Post by Cablenexus »

pavelk wrote: Thu Aug 23, 2018 5:47 pm
Chris36 wrote: Thu Aug 23, 2018 5:19 pmRight there i got a question, do you know theres a shortcut in the editor allowing me to draw a terrain over a bigger area than one tile per click? Something like holding shift + holding left mouse constantly draw a terrain over the tile you are hovering over?
Right now there isnt. I have it in my todo list but it is actually pretty low priority. Now you really have to go one by one. Sorry about that.

What I can do for you is the same I did for Cablenexus - you create the "map bitmap" and I "export" it to the actual Aggressors map. Cablenexus, would you mind step in and explain what you did?
Good point about the terrain. I have to admit and be honest that I took a bit help from Pavel for this part. There is a tool available (but not for release yet) that can make the game map from an pixel image. It's just not friendly and/or save to use yet for us modders.

I agree that it should be nice to have this in the editor as well in the (near) future to select a bigger terrain brush to paint.

I can advice you however how to create your map to make it ready for this tool.

- Always make your own 10 color palette. Just choose 10 random colors, that distinct somewhat from each other. Every color represent one terrain.

- Every ingame tile is 1 pixel. So if you choose a 80 x 80 (largest) map you create a simple 80 x 80 pixel image in any paint editor.

- Zoom in enough and start to paint your map and keep your own legenda which color represent which terrain (you can use my tile raster image for it and simply paint a colored dot on top of any of the terrains as reference).

- This way you can pixel paint your whole map from scratch, but you can even search for an existing (ancient) map on the web, resize it to the amount of pixels/tiles you want to use and use this map as a layer/example to pixel paint your own map. (Just make sure again you use 10 colors max).

If you have your 10 color map ready and the legenda and a pixel perfect image from your map the exact same tile size in pixels save it and send it to Pavel.

Of course you are also free to paint your whole map tile by tile in the editor. It isn't that much work as it looks at first and you can create nice details that way (since you have to revisit the tiles later anyway to place objects and rivers etc etc).
Cablenexus
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1691
Joined: Mon Jan 04, 2016 7:09 pm

Re: [Modding]A first scenario and little bit of modding

Post by Cablenexus »

One more golden tip before you start modding. Make a simple/small and effective test map to test your mechanism. If you want to test every minor change in your mod while using a large map you have loading times every minor change.
I will add this also to the guide.
Chris36
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 50
Joined: Mon Mar 10, 2014 8:44 pm

Re: [Modding]A first scenario and little bit of modding

Post by Chris36 »

Had a hard time with gimp but at least i could setup both resources and started to edit the terrains.
One thing to the resources: first i modified only to the ag file in the mod folder and added 2 resources, but it didnt work ingame. So i also put the same lines into the user scenario file and the resources were visible ingame. Is that the way it should work or did i maybe an error in the mod ag file?
Cablenexus
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1691
Joined: Mon Jan 04, 2016 7:09 pm

Re: [Modding]A first scenario and little bit of modding

Post by Cablenexus »

Chris36 wrote: Mon Aug 27, 2018 2:27 pm Had a hard time with gimp but at least i could setup both resources and started to edit the terrains.
One thing to the resources: first i modified only to the ag file in the mod folder and added 2 resources, but it didnt work ingame. So i also put the same lines into the user scenario file and the resources were visible ingame. Is that the way it should work or did i maybe an error in the mod ag file?
You are right. The resources are assigned in the mod file to use in any scenario made with your mod. But you also have to specify them in the scenario file.

Personally I use Paint.net since there are many plugins for free to download that I know to work with. If you find your way in Gimp that will be ok as well, but the UI is somewhat "original" so harder to get into.

Use the ancient med scenario (it's in the scenario folder in the games BIN directory) as an example and the original mod as an example. This is the best help.
Watch Pavel's mod video:

https://www.youtube.com/watch?v=OaGg_8YGGpM

Ask question in the forum.

If you managed to get your resources ingame you already make a great start. It is pretty advanced stuff. For me it was hard as well in the beginning. You will be slowly start to get more convient with the app.
Good luck!

(Post screenshots from your progress eventually and tell what you did. You are the second modder, it can be very helpful for others).
pavelk
Kubat Software
Kubat Software
Posts: 2467
Joined: Mon May 16, 2016 4:27 pm

Re: [Modding]A first scenario and little bit of modding

Post by pavelk »

Chris36 wrote: Mon Aug 27, 2018 2:27 pmfirst i modified only to the ag file in the mod folder and added 2 resources, but it didnt work ingame. So i also put the same lines into the user scenario file and the resources were visible ingame. Is that the way it should work or did i maybe an error in the mod ag file?
The problem you are experiencing is that you didnt bind the scenario file to your new mod (I would say).

You should not add resources to the scenario file. It MIGHT work but the problem is that scenario doesnt contain any resource images so it will not be taken by the game.
I am not sure how did you bind the resource images to the scenario, but that is not the correct way to go.

If you look at Holland mod, it should be easy enough to redo the same approach.
Cablenexus
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1691
Joined: Mon Jan 04, 2016 7:09 pm

Re: [Modding]A first scenario and little bit of modding

Post by Cablenexus »

pavelk wrote: Mon Aug 27, 2018 2:53 pm
Chris36 wrote: Mon Aug 27, 2018 2:27 pmfirst i modified only to the ag file in the mod folder and added 2 resources, but it didnt work ingame. So i also put the same lines into the user scenario file and the resources were visible ingame. Is that the way it should work or did i maybe an error in the mod ag file?
The problem you are experiencing is that you didnt bind the scenario file to your new mod (I would say).

You should not add resources to the scenario file. It MIGHT work but the problem is that scenario doesnt contain any resource images so it will not be taken by the game.
I am not sure how did you bind the resource images to the scenario, but that is not the correct way to go.

If you look at Holland mod, it should be easy enough to redo the same approach.
I have this line in my scenario file that's why I thought it was ok like this:

<GameResourceMemento id="12" name="Resources.Cowhide" attributes="15" bitmapFile="Resources-Cowhide.png" scripting="DefaultResourceBehavior" expirationPercentage="33" gameResourceType="0" notAllowedResourcePanelAttributes="0" horizontalIndex="0" verticalIndex="1" resourceText="Texts.ResourceValue" lowerScaleDescription="Texts.MapScaleMoreConsumption" averageScaleDescription="Texts.MapScaleAverageProduction" highestScaleDescription="Texts.MapScaleMoreProduction" />
<GameResourceMemento id="13" name="Resources.Fish" attributes="15" bitmapFile="Resources-Fish.png" scripting="DefaultResourceBehavior" expirationPercentage="88" gameResourceType="0" notAllowedResourcePanelAttributes="0" horizontalIndex="1" verticalIndex="1" resourceText="Texts.ResourceValue" lowerScaleDescription="Texts.MapScaleMoreConsumption" averageScaleDescription="Texts.MapScaleAverageProduction" highestScaleDescription="Texts.MapScaleMoreProduction" />
</resources>
</resources>
pavelk
Kubat Software
Kubat Software
Posts: 2467
Joined: Mon May 16, 2016 4:27 pm

Re: [Modding]A first scenario and little bit of modding

Post by pavelk »

Cablenexus wrote: Mon Aug 27, 2018 3:09 pm I have this line in my scenario file that's why I thought it was ok like this:

<GameResourceMemento id="12" name="Resources.Cowhide" attributes="15" bitmapFile="Resources-Cowhide.png" scripting="DefaultResourceBehavior" expirationPercentage="33" gameResourceType="0" notAllowedResourcePanelAttributes="0" horizontalIndex="0" verticalIndex="1" resourceText="Texts.ResourceValue" lowerScaleDescription="Texts.MapScaleMoreConsumption" averageScaleDescription="Texts.MapScaleAverageProduction" highestScaleDescription="Texts.MapScaleMoreProduction" />
<GameResourceMemento id="13" name="Resources.Fish" attributes="15" bitmapFile="Resources-Fish.png" scripting="DefaultResourceBehavior" expirationPercentage="88" gameResourceType="0" notAllowedResourcePanelAttributes="0" horizontalIndex="1" verticalIndex="1" resourceText="Texts.ResourceValue" lowerScaleDescription="Texts.MapScaleMoreConsumption" averageScaleDescription="Texts.MapScaleAverageProduction" highestScaleDescription="Texts.MapScaleMoreProduction" />
</resources>
</resources>
In scenario file? well that is wrong. It should be in your mod.ag file for sure.
Everything was is done in scenario should be created by the game editor. The rest (basically all the rules) should be in mod.ag file
Cablenexus
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1691
Joined: Mon Jan 04, 2016 7:09 pm

Re: [Modding]A first scenario and little bit of modding

Post by Cablenexus »

pavelk wrote: Mon Aug 27, 2018 3:27 pm
Cablenexus wrote: Mon Aug 27, 2018 3:09 pm I have this line in my scenario file that's why I thought it was ok like this:

<GameResourceMemento id="12" name="Resources.Cowhide" attributes="15" bitmapFile="Resources-Cowhide.png" scripting="DefaultResourceBehavior" expirationPercentage="33" gameResourceType="0" notAllowedResourcePanelAttributes="0" horizontalIndex="0" verticalIndex="1" resourceText="Texts.ResourceValue" lowerScaleDescription="Texts.MapScaleMoreConsumption" averageScaleDescription="Texts.MapScaleAverageProduction" highestScaleDescription="Texts.MapScaleMoreProduction" />
<GameResourceMemento id="13" name="Resources.Fish" attributes="15" bitmapFile="Resources-Fish.png" scripting="DefaultResourceBehavior" expirationPercentage="88" gameResourceType="0" notAllowedResourcePanelAttributes="0" horizontalIndex="1" verticalIndex="1" resourceText="Texts.ResourceValue" lowerScaleDescription="Texts.MapScaleMoreConsumption" averageScaleDescription="Texts.MapScaleAverageProduction" highestScaleDescription="Texts.MapScaleMoreProduction" />
</resources>
</resources>
In scenario file? well that is wrong. It should be in your mod.ag file for sure.
Everything was is done in scenario should be created by the game editor. The rest (basically all the rules) should be in mod.ag file
The same lines are in the mod file as well. I'm not sure why and how I put them in my scenario. I will change it but after tonight. I don't want to upload anything new before the live stream ;-)
Chris36
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 50
Joined: Mon Mar 10, 2014 8:44 pm

Re: [Modding]A first scenario and little bit of modding

Post by Chris36 »

I changed it, so resources are back in the mod.ag file and it looks now like this:

mod.ag

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<MainMemento xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
  <StateMemento actualPlayerId="0" name="Ancient Rome" resourceType="3">
    

    <resources>
      <resources>
        <GameResourceMemento id="12" name="Resources.OliveOil" bitmapFile="Resources-OliveOil.png" attributes="15" scripting="DefaultResourceBehavior" gameResourceType="0" expirationPercentage="0" notAllowedResourcePanelAttributes="0" horizontalIndex="0" verticalIndex="1" lowerScaleDescription="Texts.MapScaleMoreConsumption" averageScaleDescription="Texts.MapScaleAverageProduction" highestScaleDescription="Texts.MapScaleMoreProduction" resourceText="Texts.ResourceValue" />
        <GameResourceMemento id="13" name="Resources.Wine" bitmapFile="Resources-Wine.png" attributes="15" scripting="DefaultResourceBehavior" gameResourceType="0" expirationPercentage="0" notAllowedResourcePanelAttributes="0" horizontalIndex="1" verticalIndex="1"  lowerScaleDescription="Texts.MapScaleMoreConsumption" averageScaleDescription="Texts.MapScaleAverageProduction" highestScaleDescription="Texts.MapScaleMoreProduction" resourceText="Texts.ResourceValue" />
       </resources>
    </resources>
    
  </StateMemento>
</MainMemento>

In the scenario.ag file i deleted those 2 lines and the mod was already bound. ITs all fine, my mod folder indeed is ancient_rome-test

Code: Select all

  <prerequisities>
    <prerequisities>
      <PrerequisiteMemento mod="ancient_rome-test" scenario="testScen" />
    </prerequisities>
  </prerequisities>
Now the 2 new resources are again partly not in the game. You see the first half of the 1st new resource at the top resource bar and its even the right text. But its not on any other screens in the game(agressors Library etc).
YOu can see it at the screenshot.
https://1drv.ms/u/s!AoI30LkPvqcckxpDOPz24Lc4Z57A

BTW from now on i got much more spare time and little things like this will be easier figured out by myself.


Cablenexus, Good idea to take Screenshots of the progress. I will document it even a little bit but not that much that i make a double of your documentation. Maybe i got here and there some fresh info.
Last edited by Chris36 on Mon Aug 27, 2018 4:51 pm, edited 2 times in total.
Cablenexus
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1691
Joined: Mon Jan 04, 2016 7:09 pm

Re: [Modding]A first scenario and little bit of modding

Post by Cablenexus »

Can you try to post the screenshot again?

(go to attachement tab, add file, put your cursor somewhere between text and click insert).

-edit-

Ah I see the link now.
pavelk
Kubat Software
Kubat Software
Posts: 2467
Joined: Mon May 16, 2016 4:27 pm

Re: [Modding]A first scenario and little bit of modding

Post by pavelk »

Can you please zip the mod folder and scenario and attach it here? I will take a look. Either after the stream or tomorrow morning.
Cablenexus
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1691
Joined: Mon Jan 04, 2016 7:09 pm

Re: [Modding]A first scenario and little bit of modding

Post by Cablenexus »

Same issue for me when I delete the resources from my scenario.ag
resources.jpg
resources.jpg (105.86 KiB) Viewed 4917 times
I use jpeg files since there is a 1 mb file restriction in Slitherine forums for screenshots.
save as jpg instead of png

@Pavel, you already have my mod and scenario maybe you can look into that one if time of course.
I prefer to do this all after live stream since it works with the line in scenario.ag now for me.
pavelk
Kubat Software
Kubat Software
Posts: 2467
Joined: Mon May 16, 2016 4:27 pm

Re: [Modding]A first scenario and little bit of modding

Post by pavelk »

Cablenexus wrote: Mon Aug 27, 2018 5:07 pm @Pavel, you already have my mod and scenario maybe you can look into that one if time of course.
I prefer to do this all after live stream since it works with the line in scenario.ag now for me.
Sure, I am not going to change it now anyway. I will have a look tomorrow morning and we will fix it up.
Cablenexus
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1691
Joined: Mon Jan 04, 2016 7:09 pm

Re: [Modding]A first scenario and little bit of modding

Post by Cablenexus »

@Chris,

Reading your first post and ambition for the scenario, I think this can be of use:

scenario.ag (turns)

<gameTime initialTurnIndex="1" initialYear="-60" stepsPerTurn="1">
<turnNames>
<string>Turns.Spring</string>
<string>Turns.Summer</string>
<string>Turns.Autumn</string>
<string>Turns.Winter</string>
</turnNames>
</gameTime>

mod.ag (new terrain)

<terrainAttributes>
<terrainProperties>
<terrainProperties>
<TerrainPropertiesMemento id="4" name="Terrains.WATER" color="-16747623" isRotationAllowed="false" roadSuitability="0" roadAllowed="false" altitudes="3" staticGeometrySurroundingsScale="1.0" defaultUnitOffset="-0.1" isOwnerable="false" isFlat="true" isDefaultNewMapTerrain="true" bitmapIndex="11" coastBitmapIndex="14" isReduceable="true" heightPriority="11" averageHeight="0.0" gameSoundId="1004" riverGameSoundId="100" randomHeightOffsetFrom="0" randomHeightOffsetTo="0.0" scripting="CloseToCityTerrainPropertyBehavior" setOwnerWhenConqueredType="0" isTerrainVerticesUsedIfChanged="true">
<tradeRouteSetting tradeLoss="0.005" robberyChance="0.002" noOwnerTradeLossOverhead="1.0" noOwnerRobberyChanceOverhead="1.0" otherPlayerTradeLossOverhead="1.0" otherPlayerRobberyChanceOverhead="1.0" piracyChance="0.03" riverTradeLoss="0.004" riverRobberyChance="0.0005" riverCoefficient="4" />
<supplySetting supplyOverhead="1.0" roadSupplyOverhead="0.1" improvedRoadSupplyOverhead="0.05" riverOverhead="1.0" />
<depthSettings mapColor="-15580575" panelColor="-11627114" />
<production>
<products>
<ProductMemento id="5" perTurns="1" value="0.6" />
<ProductMemento id="13" perTurns="1" value="0.3" />
</products>
</production>

mod.ag (new buildings) (use UNITS script file as well).

<unitModels>
<unitModels>
<UnitModelMemento id="70" parentModelId="0" scripting="Resource" name="Units.CowhideFarm" bitmapFile="Units.CowhideFarm.png" upgradeModelId="0" hintId="hintresource" highlightHintId="MapAndUIHelp.Variant8" technologyId="1" movement="0" processingIndex="4" maxInfluenceMovesPerTurn="3" moraleIncrease="0" moraleDecrease="0" crossRiverWithoutBridgeMovementPenalty="0" needBridgeToCrossRiver="2" autoHeal="0" healSelf="0" defenseHealSelfPenalty="0" recover="0" defenseRecoverPenalty="0" battleExperienceIncrease="0" newBehaviorExperienceIncrease="0" isModelDisabledByDefault="false" maxTrainingFacilityDistance="0" selectableTargetAltitudes="0" maxReparingFacilityDistance="0" maxUpgradingFacilityDistance="1" outOfDefenseNumberOfShotsPenalty="0" unitSize="3" defeatedLimit="0.5" damagedResourceKeeperPenalty="0.8" brokenResourceKeeperPenalty="0.9" sizeLimit="1" masterUnitResourceKeeperValue="3" defenseReadinessBonus="0" requiredEvacuationDistance="0" isCapitolType="false" ignoresPeace="false" surrendersWithoutOwner="true" percentageOwnerChangedWhenPlayerTerminated="50" fortifyBonus="40" altitude="4" unitClass="16" fillFor="0" destroyedWithoutResources="0" moraleDestroyedAction="0" destroyBridgeRange="0" buildBridgeRange="0" tileOwnerDependant="true" canBeUnowned="true" canBePillaged="true" canReduceProduction="false" canUseDevices="false" tileOwnerChanger="true" canAffectPlayerTermination="false" canBeDestroyedInFight="false" canBeDestroyed="false" builtOnlyOnOwners="true" canBeOnlyMasterUnit="false" transitShedForAltitudes="0" canChangeResourceKeeping="false" maxResourceKeeping="1" viewRange="0" hiddenViewRange="0" notDisplayedWhenNotInvented="true" staysVisibleIfDetected="0" visibilityIfDetected="2" canBeAltered="true" keepUpgradeSize="0" keepUpgradeMaxSize="0" keepUpgradeVisibility="true" zeroizeMovementAfterUnload="true" zeroizeMovementAfterLoad="true" maxDeployRadius="1" deployLimit="0" deployRandomness="5" captureBreakRandomness="40" maxDeployRandomness="0" isEnemyUnitsDisplayedInUnitWindow="true">
<graphicPropertiesMemento inheritsFromParent="false" scale="0.060" brightness="1.0" isFourDirectionModel="0" iconZOrderIndex="0" alwaysDisplayed="false" canRotateAgainstEnemy="false" movesWhenAttack="false" minimumAttackDistance="0.8" displayFlag="false" shadowTreshold="-1.0" baseOffset="-0.01" randomRotation="true" rotationRange="rand(290-320)" randomAngle="30" isScalable="false" isBrokenYOffset="0.07" staticGeometryRadius="0.3" ruinsMaterial="Units.StoneMineRuins" isBrokenScale="1" mapScale="0.5" altitudesHiddenWhenSelected="5" maxDisplaySmoke="1" noiseBitmapIndex="173" visibilityIndex="10" visibilityExceptions="0" yOffsetDetection="4" afterAttackMoveBackwards="false" isHighlightPriority="true">
<position x="0.2" y="-0.05" z="-0.25" w="0" isSet="true" />
<altitudeModels inheritsFromParent="false">
<altitudeModels>


Citynames taken from scenario.ag files first. If run out they took the mod unitnames

<unitNames>
<unitNames>
<UnitNameMemento name="Fanum Martis" modelIds="1" />
<UnitNameMemento name="Geminiacum" modelIds="1" />
<UnitNameMemento name="Pernaco" modelIds="1" />
<UnitNameMemento name="Avg Svessor" modelIds="1" />
<UnitNameMemento name="Eliberre" modelIds="1" />
<UnitNameMemento name="Bibona" modelIds="1" />
<UnitNameMemento name="Dvrocortoro" modelIds="1" />
<UnitNameMemento name="Adolivam" modelIds="1" />
<UnitNameMemento name="Monte" modelIds="1" />
<UnitNameMemento name="Rvsazv Mvnicipivm" modelIds="1" />
<UnitNameMemento name="Rvsippisir Mvnicipio" modelIds="1" />
<UnitNameMemento name="Rvzai Mvnicipiv" modelIds="1" />
<UnitNameMemento name="Sitifi Colonia" modelIds="1" />
<UnitNameMemento name="Syda Mvnicipivm" modelIds="1" />
<UnitNameMemento name="Zaras" modelIds="1" />
<UnitNameMemento name="Ad Stabvlv Olearivm" modelIds="1" />

Same for armynames:

<unitNamePatterns>
<unitNamePatterns>
<UnitNamePatternMemento pattern="UnitNamePattern.Legion" unitPatternType="5" altitude="4" unitClass="1" modelIds="" notModelsId="" canAttack="true">
<alternatives>
<string>Fortis I Hilarius</string>
<string>Fortis II Laurentinus</string>
<string>Fortis III Pavlackius</string>
<string>Fortis IV Sergius</string>
<string>Fortis V Spurius</string>

In mod file: (add new unit behavior to a unit)

<UnitBehaviorAcquirementMemento behaviorId="41" unitBehaviorAcquirementTypeId="3" improvedInsideContainerId="4" isSelfImprover="false" acquireChance="40" whenWins="true" fightAcquireMaximumPercentageLimit="70">
<costs inheritsFromParent="false" timerequired="1" executionTime="0" activeType="false" sizeCoefficient="1">
<resources>
<PlayerResourceMemento id="1" value="-1" />
<PlayerResourceMemento id="3" value="-1" />
</resources>
</costs>


to translate RGB colors (255 0 0 for example RED) to Aggressors text: (for example player overlay etc).

http://rextester.com/CNE34226

All references to ingame texts are find in the ResourceText file (open it as XML extension) like library entries etc.
They always have reference in the .ag file (use other mod/scenario as an example).
Chris36
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 50
Joined: Mon Mar 10, 2014 8:44 pm

Re: [Modding]A first scenario and little bit of modding

Post by Chris36 »

Great stuff! :D Escpecially the info with the seasons is just amazing, thanks!!
Post Reply

Return to “Aggressors Modding”