Is it possible to change the unique unit in map editor using script?

Modding, Map Editor, IES Scripting and Other Questions
Post Reply
skyfuzzball8312
Posts: 4
Joined: 20 Sep 2023, 14:19
Has thanked: 1 time

Is it possible to change the unique unit in map editor using script?

Post by skyfuzzball8312 »

Hi. I was thinking about how can I change the unique unit by using game script. If possible, how can I do it? Thanks.

User avatar
Dr.MonaLisa
High Representative
Posts: 8708
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Is it possible to change the unique unit in map editor using script?

Post by Dr.MonaLisa »

Hi. Do you mean modding game files to replace an unique unit, or changing it dynamically by the IES script in custom scenarios?
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
skyfuzzball8312
Posts: 4
Joined: 20 Sep 2023, 14:19
Has thanked: 1 time

Re: Is it possible to change the unique unit in map editor using script?

Post by skyfuzzball8312 »

Dr.MonaLisa wrote: 21 Sep 2023, 19:49 Hi. Do you mean modding game files to replace an unique unit, or changing it dynamically by the IES script in custom scenarios?
I mean changing it dynamically by the IES script in custom scenarios?
User avatar
Dr.MonaLisa
High Representative
Posts: 8708
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Is it possible to change the unique unit in map editor using script?

Post by Dr.MonaLisa »

Hmm... you can check the available commands deeply:
viewtopic.php?t=5589

But I don't think it's possible. You'd at most be able to create unique units at location, with the script, bur not allow players peoduce them.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
User avatar
Loewenherz
Posts: 244
Joined: 23 Sep 2017, 17:26
Has thanked: 7 times
Been thanked: 21 times

Re: Is it possible to change the unique unit in map editor using script?

Post by Loewenherz »

A few possibilities may exist. What exactly do you have in mind?

If you want to make a certain unit, which is bound to a civilization, accessible to another civilization, this is not possible via IES scripting.
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
skyfuzzball8312
Posts: 4
Joined: 20 Sep 2023, 14:19
Has thanked: 1 time

Re: Is it possible to change the unique unit in map editor using script?

Post by skyfuzzball8312 »

Loewenherz wrote: 23 Sep 2023, 23:25 A few possibilities may exist. What exactly do you have in mind?

If you want to make a certain unit, which is bound to a civilization, accessible to another civilization, this is not possible via IES scripting.
Making a unique military unit available to be appeared to be generated in military buildings such as Airport, Barrack, Archery Range, and Stable.
User avatar
Dr.MonaLisa
High Representative
Posts: 8708
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Is it possible to change the unique unit in map editor using script?

Post by Dr.MonaLisa »

skyfuzzball8312 wrote: 24 Sep 2023, 03:00
Making a unique military unit available to be appeared to be generated in military buildings such as Airport, Barrack, Archery Range, and Stable.
That won't be possible with IES scripting. Even adding units to building by modding the files can sometimes be complicated (and require edition of multiple files), so with IES you could at most unlock a technology that allows to produce the unit, but it would need to be defined in game files first, with the exact slot specified, and dozens of other parameters / references in different files.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
User avatar
Gonzalo
Posts: 336
Joined: 24 Aug 2018, 08:56
Been thanked: 3 times

Re: Is it possible to change the unique unit in map editor using script?

Post by Gonzalo »

Thanks for replies, I have been focusing on girl and forgot about the game, now I am happily alone and shyly returning into normal life.
Post Reply

Return to “Questions”