Scripting?

Post Reply
76mm
Lieutenant Colonel - Panther D
Lieutenant Colonel - Panther D
Posts: 1289
Joined: Tue Feb 09, 2010 12:08 pm

Scripting?

Post by 76mm »

Is there a guide available describing what can be done with scripting?

For instance, would it be possible to create a script that would allow players to merge units in the same tile? In other words, if two hoplite (or whatever) units were stacked in the same tile, to combine them into one, stronger, hoplite unit?
pavelk
Kubat Software
Kubat Software
Posts: 2467
Joined: Mon May 16, 2016 4:27 pm

Re: Scripting?

Post by pavelk »

Hi 76mm,
76mm wrote: Mon Sep 10, 2018 10:57 pmIs there a guide available describing what can be done with scripting?
right now there is only a bit older video describing the modding possibitilies in nutshell. We plan to write a detailed guide for modding but there hasnt been time yet.
76mm wrote: Mon Sep 10, 2018 10:57 pmWould it be possible to create a script that would allow players to merge units in the same tile? In other words, if two hoplite (or whatever) units were stacked in the same tile, to combine them into one, stronger, hoplite unit?
Yes, it can be easily done. You create new unit action (in msgs.cs) which will be available only when unit is on tile where is another unit of the same type and once it happens and player execute that action, it will remove one of the units and add power (attack and defense) to the selected unit.
The scripts are written in C# and you have the whole .NET Framework available in the scripts.
76mm
Lieutenant Colonel - Panther D
Lieutenant Colonel - Panther D
Posts: 1289
Joined: Tue Feb 09, 2010 12:08 pm

Re: Scripting?

Post by 76mm »

Wow, this game continues to amaze. Still travelling but will pick it up once I'm back and then will have LOTS more questions!
pavelk
Kubat Software
Kubat Software
Posts: 2467
Joined: Mon May 16, 2016 4:27 pm

Re: Scripting?

Post by pavelk »

76mm wrote: Tue Sep 11, 2018 7:44 amwill have LOTS more questions!
Sure, bring them on:) I also recommend to look into existing official mod scripts (in Scripts subfolder of ancient_rome folder). You will surely find interesting examples of what you might use later on.

And have fun:)
Post Reply

Return to “Aggressors Modding”