May 6th, 2025, 08:44
(This post was last modified: May 6th, 2025, 20:31 by Suppanut.)
Posts: 1,174
Threads: 15
Joined: Nov 2020
How could I imitate effect of Doomsday and Armageddon that change terrain of tiles around the world at random while avoid caster wizard's city entirely? is there any terrain flag related to getterrain command that that exist but not tell in script.txt?
I have also try make end turn scrip that not tie to wizard either run at last ai wizard turn. In early game it working fine but by late script is no longer functioning. Then I try to make the same script run at the end of neutral player turn which it also seems not working too. Now I temporary make script run at the end of neutral player turn instead. Is there anyway to fix this?
September 4th, 2025, 16:25
Posts: 573
Threads: 1
Joined: Dec 2019
Well, it wasn't as easy as I thought it would be to create a score modifier: "Start with a hero." Of course, if you change the starting unit in races.ini, you get tons of copies of the same hero. It's easy enough to create a summoning spell for a specific hero. But I don't see any way to make it a one-time spell like it is, for example, with Tree of Knowledge...
September 13th, 2025, 16:27
Posts: 573
Threads: 1
Joined: Dec 2019
Does anyone know what a reasonable close to maximum skill can look like in COM? That would be interesting to know for a certain spell design.
With SETSPELLSTATE, it should now actually be possible to insert spells into empty books stolen from other wizards using mods. What's the best way to do this?
September 24th, 2025, 10:36
Posts: 10,536
Threads: 395
Joined: Aug 2015
(September 4th, 2025, 16:25)Slingers Wrote: Well, it wasn't as easy as I thought it would be to create a score modifier: "Start with a hero." Of course, if you change the starting unit in races.ini, you get tons of copies of the same hero. It's easy enough to create a summoning spell for a specific hero. But I don't see any way to make it a one-time spell like it is, for example, with Tree of Knowledge...
Sounds like a feature request for a "CreateUnit" script command to me. I'll have to check whether that's safe to do from a script though but it might be,
September 25th, 2025, 10:27
Posts: 573
Threads: 1
Joined: Dec 2019
(September 24th, 2025, 10:36)Seravy Wrote: (September 4th, 2025, 16:25)Slingers Wrote: Well, it wasn't as easy as I thought it would be to create a score modifier: "Start with a hero." Of course, if you change the starting unit in races.ini, you get tons of copies of the same hero. It's easy enough to create a summoning spell for a specific hero. But I don't see any way to make it a one-time spell like it is, for example, with Tree of Knowledge...
Sounds like a feature request for a "CreateUnit" script command to me. I'll have to check whether that's safe to do from a script though but it might be,
If such a script command is possible, it would of course be a luxury solution. Units added via score modifiers at the start of the game already have a safe place to land. I think it would be very easy to use.
October 29th, 2025, 03:17
Posts: 1,174
Threads: 15
Joined: Nov 2020
What is unit ID of werewolves gain from casting Lycanthropy? will it using old unit ID of original host or it new unit ID like summon spell? I think about how to transfer some perk from original host to new werewolves.
October 29th, 2025, 03:22
Posts: 10,536
Threads: 395
Joined: Aug 2015
It uses the original unit ID.
October 29th, 2025, 05:18
Posts: 1,174
Threads: 15
Joined: Nov 2020
(October 29th, 2025, 03:22)Seravy Wrote: It uses the original unit ID.
Thank you.
October 30th, 2025, 22:29
(This post was last modified: October 30th, 2025, 22:34 by Seravy.)
Posts: 10,536
Threads: 395
Joined: Aug 2015
Quote:I'll have to check whether that's safe to do from a script though but it might be,
So I looked at this.
Creating units calls the unit recalculation function which runs two scripts.
I don't remember whether running a script during another one ever worked or was an abandoned feature.
Then it's also neccesary to look for the 9 unit limit and push units outside as needed, triggering further recalculation scripts, unless I add a big warning that says to only create units after looking at the unit count on the tile.
I guess this pretty much counts as "unsafe".
(maybe an alternate solution like delaying the unit creation until the end of the script could work but then generally wouldn't work if the script wants to do anything with the unit, like add stats or set combat position or anything. So I rather not. Or we can just risk it and add the command with a big red "use at your own risk, might not work" label but I don't particularly like that either. )
btw for a summoning spell for a specific hero, assuming the OLSpell script runs after the summon, you might be able to check for a duplicate summoned hero and kill/replace it. Change the type to another, nonhero unit instead for example.
October 31st, 2025, 03:53
Posts: 573
Threads: 1
Joined: Dec 2019
(October 30th, 2025, 22:29)Seravy Wrote: Quote:I'll have to check whether that's safe to do from a script though but it might be,
So I looked at this.
Creating units calls the unit recalculation function which runs two scripts.
I don't remember whether running a script during another one ever worked or was an abandoned feature.
Then it's also neccesary to look for the 9 unit limit and push units outside as needed, triggering further recalculation scripts, unless I add a big warning that says to only create units after looking at the unit count on the tile.
I guess this pretty much counts as "unsafe".
(maybe an alternate solution like delaying the unit creation until the end of the script could work but then generally wouldn't work if the script wants to do anything with the unit, like add stats or set combat position or anything. So I rather not. Or we can just risk it and add the command with a big red "use at your own risk, might not work" label but I don't particularly like that either. )
btw for a summoning spell for a specific hero, assuming the OLSpell script runs after the summon, you might be able to check for a duplicate summoned hero and kill/replace it. Change the type to another, nonhero unit instead for example.
If a unit is created for the starting city using Entergame.cas, there is no need to check the 9 units limit. Summoning specific hero and removing the spell in the process + after first turn was possible as a workaround. Only it was not used by all AI wizards, that might choose another spell category for their first turn.
|