CHanging unit stats through scripting

ImageImageTalking about Modding for EE2 and EE2 AOS. New maps, patches, programs and Multiplayer scenarios.
Post Reply
Serchant
Posts: 1
Joined: 24 Apr 2019, 15:57

CHanging unit stats through scripting

Post by Serchant » 24 Apr 2019, 16:01

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.


Sat42
Posts: 42
Joined: 03 Dec 2018, 18:01

Re: CHanging unit stats through scripting

Post by Sat42 » 24 Apr 2019, 22:12

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

User avatar
Dr.MonaLisa
High Representative
Posts: 7609
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: CHanging unit stats through scripting

Post by Dr.MonaLisa » 25 Apr 2019, 00:03

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.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

User avatar
Loewenherz
Posts: 165
Joined: 23 Sep 2017, 17:26

Re: CHanging unit stats through scripting

Post by Loewenherz » 05 May 2019, 11:13

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.
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

Post Reply

Return to “EE2 files, modding, maps, testing, etc.”