CHanging unit stats through scripting
CHanging unit stats through scripting
Since there are no triggers present like EE1, is it possible to change for example a maceman's hp and attack? I want to create a co op map in which the ai is a bit OP in which the players must compete together against the AI.
Re: CHanging unit stats through scripting
Hi Serchant!
Someone else with more experience will give you the detailed answer soon, if not today then in the coming days - all I can say is YES it is totally possible, that much I know, and I am interested in learning how to do these kinds of modifications myself so will follow this thread!
cheers
Someone else with more experience will give you the detailed answer soon, if not today then in the coming days - all I can say is YES it is totally possible, that much I know, and I am interested in learning how to do these kinds of modifications myself so will follow this thread!
cheers
- Dr.MonaLisa
- High Representative
- Posts: 8708
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 108 times
Re: CHanging unit stats through scripting
viewtopic.php?p=23816#p23816
Check my "pirates" scenario .ies file.
I'm pretty sure I added more health and power to ships using the Crown Effect.
I know there are functions like AttachEffectToUnit (not sure if wrote it correctly), and that's the thing that would be most useful. You can spam the same line of code like 20 times to get more and more health.
Check my "pirates" scenario .ies file.
I'm pretty sure I added more health and power to ships using the Crown Effect.
I know there are functions like AttachEffectToUnit (not sure if wrote it correctly), and that's the thing that would be most useful. You can spam the same line of code like 20 times to get more and more health.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
- Loewenherz
- Posts: 244
- Joined: 23 Sep 2017, 17:26
- Has thanked: 7 times
- Been thanked: 21 times
Re: CHanging unit stats through scripting
A little bit you can change over your .ies scripts. Besides that, you have 2 ways, to change the unit stats in a scenario.
Over AttachEffectToUnit, AttachEffectToGroup or AttachEffectToPlayer you can attach a effect in a scenario. A effect can chanche stats like attack, speed, live or fervor. The weather is also an effect and the crowns. Based on this, you can use a existing effect or create a own in the .ddf file for that. A effect adds his values to existing stats.
The second way is the unit update. Add the data to the appropriate files (.ddf and .csv). Than use SetTechEnabled and AwardTech in the ies script. Over this way, you can chanche everthing like the name from units, the description, the 3d Model, the icon, build time... This trick is used in the russian campaign for the city center and the uni in a mission from the russian campaign. You can test the russian city center and uni trick in a own mission.
Principle also in the german Mission from Kursk (Tanks from Germany are stronger) and in the maasai campaign this trick is used. In this missions from africa campaign, you cant send units in the uni and the temple. But it seems, for that has used the developer own commands in the script.
Over AttachEffectToUnit, AttachEffectToGroup or AttachEffectToPlayer you can attach a effect in a scenario. A effect can chanche stats like attack, speed, live or fervor. The weather is also an effect and the crowns. Based on this, you can use a existing effect or create a own in the .ddf file for that. A effect adds his values to existing stats.
The second way is the unit update. Add the data to the appropriate files (.ddf and .csv). Than use SetTechEnabled and AwardTech in the ies script. Over this way, you can chanche everthing like the name from units, the description, the 3d Model, the icon, build time... This trick is used in the russian campaign for the city center and the uni in a mission from the russian campaign. You can test the russian city center and uni trick in a own mission.
Principle also in the german Mission from Kursk (Tanks from Germany are stronger) and in the maasai campaign this trick is used. In this missions from africa campaign, you cant send units in the uni and the temple. But it seems, for that has used the developer own commands in the script.
List of tutorials, useful threads and utilities (look here before posting): Here
Add Pics to Map: viewtopic.php?f=54&p=25184#p25184
Loews Work: viewtopic.php?f=54&t=5160
Add Pics to Map: viewtopic.php?f=54&p=25184#p25184
Loews Work: viewtopic.php?f=54&t=5160