Logo Platform
logo amplifiers simplified

Is it possible to add a new unit in the game ?

Reply
Copied to clipboard!
10 years ago
Feb 14, 2015, 5:36:24 PM
Hello everyone



I'm trying to mod the game, and wondering if it is possible to add units to the existing ones?



What I'd like to do is the following things : before starting, can you tell me if it is possible or impossible with the current modding tools (assuming a basic knowledge of modding).



1) remove the Vaulter Titan technology from the vaulters tree, and make it a reward technology given through their main quest, at a precise step in their main quest.

2) Create a new unit, themed as a fragile healer, for the vaulters. This unit would be available through research of a technology at the beginning of the game, like the dawn officers;





This program implies working in the following steps :

1) transform the titan technology from a visible faction tech to an invisible one (doesn't seem too difficult).

2) make the titan tech a quest reward for the Vaulters (also seems rather easy, this is covered in the modding tutorial released by amplitude I believe?) ;

3)Create a new unit, like the eyeless ones healer, but with the justiciere model (I'm not sure about this step : Is it possible to create a new unit and add it to the game?) ;

4) Create a technology to unlock this unit, and make it a Vaulters affinity tech (seems rather troublesome actually, due to the fact it is an affinity technology).



Can you tell me if theses steps are possible currently? Any advice on how I should proceed?





By the way, a quick question : would the game support a "Total war " style play, where every region in the map would start the game with a city in it, with each city owned by a different faction (eg : a 50 region map would start with 50 factions each with a city) ?



Many thanks,



Apylam
0Send private message
10 years ago
Feb 15, 2015, 1:07:17 PM
Hello everyone



Ok, I'm trying to make a mod following the manual given and the steps above, but I always end up getting crashes at game start. I honestly can't figure out what I'm doing wrong : even very small modifications seem to cause a fatal crash during startup. Can someone help me by telling me what I'm doing wrong ? I'm working by modifying directly the files in the public directory, and then when it works I'll wrap them up in a mod package.



In order to follow my plan for a small mod to vaulters, I did the following steps :

1) transform the titan technology from a visible faction tech to an invisible one :

easy enough, I went to the "DepartmentOfScience+Constructibles[Era2Technology]" file, and modified the Vaulters Titan technology by changing the tech type to quest and adding a visibility flag :





TechnologyFlags="Quest" Visibility="VisibleWhenUnlocked">





$Property(EmpireTypeMajor/ClassResearch:TechnologyCost)* $Property(EmpireTypeMajor/ClassResearch:Era2CostMultiplier)

EmpireTypeMajor/ClassResearch,TechnologyEra2

EmpireTypeMajor,AffinityVaulters





Did it, then started the game to check : the game launches fine, and the titan tech is now invisible. Onward to step 2 :





2) make the titan tech a quest reward for the Vaulters :


In the "quest" directory, I'm creating a new droplist with the Titan tech as the only content, in order to give it as a reward for the main Vaulters quest :













I then assign this droplist to the reward section of the Vaulters main quest in the "questdefinition[vaulters]" file, chapter 4, and I end up crashing the game at beginning (at the very beginning of the loading phase of the game) :





















Is there something wrong with this code ? Why am I getting these crashes? Is it a wrong code I'm writing, or is there some sort of integrity check of the files (I'm using the steam version of the game, and Notepad to edit the .xml files).

Many thanks for your help



Apylam
0Send private message
0Send private message
10 years ago
Feb 17, 2015, 9:27:14 PM
Kingsguard



Thanks for your answer ; that's very interesting and I'll try to get it working with this help.



For the time being, I'm being stuck with my mod crashing the game when loading, and I can't figure why at all... (btw, is there a way to have a debug or a dump that gives you a clue as to why a mod crashes ? like the file read at the time of the crash?)



By going back step by step, I found out that the mod crashes because of a custom trait I wrote that is supposed to give you 500 more custom race points (I crafted this to be able to test more things at once when modding, and to make "unlimited" custom races). However, I can't figure at all why the mod is crashing at loading, as I followed the tutorial step by step.

(By the way, I think there's a mistake in the tutorial, as the localization step tells you to use the "Localization_Locales.xml" file, when the actual file that houses the localization pair, and is used in the example, is "EF_Localization_Assets_Locales").



Can you please help me figure what is wrong with the code I wrote ?



In "GUIElements", I wrote :







%FactionTraitCustomValueTitle

%FactionTraitCustomValueDescription







In "EF_Localization_Assets_Locales" I wrote :



Puissance infinie

Ajoute 500 à vos points de faction personnalisée




In "FactionTraits[Custom]" I wrote :













And in "SimulationDescriptors[FactionTrait]" I wrote :















Every time I try to load the mod, the game crashes. I followed the tutorial and the example, and can't figure at all why this isn't working.

Here is a link with the complete mod, if needed. essai.zip



Can someone help, please ? Thanks!
0Send private message
10 years ago
Feb 23, 2015, 11:25:31 AM
Hello,

Thanks for the info on localization file.

I fixed the typo in the modding file and will upload an update soon.



There are typos in your mod which makes it crash.

In factiontraits[Custom] go at the bottom. No space between "
In simulationdescriptors[factiontrait] go around line 673. Same probleme with comment. Simulationmodifierdescriptor is not included into factiontraitcustomvalue. There is a "!" after "<" which has nothing to do here.



Then it can launch if bugs above are fixed.

I hope it helps.
0Send private message
?

Click here to login

Reply
Comment