Page 19 of 24

Re: New Dynamic Script Ideas

PostPosted: 24 Jul 2014, 16:03
by andreus
hehe, it's possible to do with existing scripts: if States.GameTime mod 6000 = 0 then Actions.AIStartPosition(Player, States.KaMRandomI(255) + 1, States.KaMRandomI(255) + 1) for example :D This script will change AI start position every 10 minutes (attack target ClosestHouseFromStart/UnitFromStart can be set in MapEd).

Re: New Dynamic Script Ideas

PostPosted: 25 Jul 2014, 15:33
by RandomLyrics
OnGroupOrderAttackHouse(aGroup, aHouse: integer)
OnGroupOrderAttackUnit(aGroup, aUnit: integer)
OnGroupOrderLink(aGroup, tGroup: integer) - this is the most wanted by me :P - example: i have 2 groups one with blocked control, second without. When i link my group to that blocked, linked groups becomes unblock and some values are saved to variables.
OnUnitDied(aUnitID, aKillerID-unit, aKillerIndex) - would be great - i want to count stats for specific unit :)

Re: New Dynamic Script Ideas

PostPosted: 26 Jul 2014, 01:48
by Lewin
OnGroupOrderAttackHouse(aGroup, aHouse: integer)
OnGroupOrderAttackUnit(aGroup, aUnit: integer)
OnGroupOrderLink(aGroup, tGroup: integer)
Accepted.
OnUnitDied(aUnitID, aKillerID-unit, aKillerIndex) - would be great - i want to count stats for specific unit :)
That's not so easy to implement, the game doesn't track that. Maybe there's another way to achieve what you want?

Re: New Dynamic Script Ideas

PostPosted: 26 Jul 2014, 12:16
by RandomLyrics
That's not so easy to implement, the game doesn't track that. Maybe there's another way to achieve what you want?
Okey thanks :) ill figure out something :)

Re: New Dynamic Script Ideas

PostPosted: 01 Aug 2014, 20:57
by RandomLyrics
OnHouseSelection(aHouse, aPlayer: integer); - occurs when player click on house "loupe". - im thinking about some eco script thats helps pro players gets more information about town traffic, house performence etc.

Re: New Dynamic Script Ideas

PostPosted: 27 Sep 2014, 17:37
by The Dark Lord
@Lewin
There is a problem with RandomLyrics' script for Furious Warriors. He blocked unit control, but I found out that by selecting a group and clicking on the minimap you can still control them. It is easy to abuse at the start of the game, synchronizing your troops with your allies' or sending them to the bottom instead of top or vice-versa.

Re: New Dynamic Script Ideas

PostPosted: 27 Sep 2014, 21:31
by sado1
TDL: I quote you there, seems like it's not only scripting-related... viewtopic.php?p=40829#p40829

Re: New Dynamic Script Ideas

PostPosted: 01 Oct 2014, 19:24
by Ben
Sounds strange, but I have application for it: Is is possible (mechanically) to add a script for placing foreign wares in buildings. For example, a script to place coal in an iron mine?

(please say yes!)

Re: New Dynamic Script Ideas

PostPosted: 02 Oct 2014, 01:26
by Lewin
Sounds strange, but I have application for it: Is is possible (mechanically) to add a script for placing foreign wares in buildings. For example, a script to place coal in an iron mine?

(please say yes!)
It's technically possible because we could change every house to work like a storehouse and be capable of holding any type of ware, give every house a storehouse GUI alongside the normal one, etc. But no right now it is not possible. And I don't think we will ever implement that anyway, it doesn't sound like a good idea to me.

Re: New Dynamic Script Ideas

PostPosted: 02 Oct 2014, 05:10
by Krom
@Ben: Why would you need that? :)

Re: New Dynamic Script Ideas

PostPosted: 02 Oct 2014, 13:22
by Michalpl
New scripts
Action.AIForceBuild 1 player index 2 house id 3 next to house id leave 0 for everywhere 4 amount will return 0 on failure 1 one succes
States.StatStorehouseWareAmount 1 ware type 2 amount 3 x cord 4 y cord will return ware amount
Action.BlockTile 1 x cord 2 y cord
Action.RemoveBlockTile 1 x cord 2 y cord
Action.TeleportGroup 1 x cord 2 y cord

Desc:
Force the AI to build a creatain building next to specifed house in amount of x
Return specifed ware amount
Places that red square
Removes that red square
Teleports group to location

Re: New Dynamic Script Ideas

PostPosted: 02 Oct 2014, 17:12
by Ben
Sounds strange, but I have application for it: Is is possible (mechanically) to add a script for placing foreign wares in buildings. For example, a script to place coal in an iron mine?

(please say yes!)
It's technically possible because we could change every house to work like a storehouse and be capable of holding any type of ware, give every house a storehouse GUI alongside the normal one, etc. But no right now it is not possible. And I don't think we will ever implement that anyway, it doesn't sound like a good idea to me.
Well that's too bad. What if you had a script that enabled a building to act as a storehouse? That way in normal games you wouldn't have to bother with the compound GUI. to answer Krom's question, I would like to be able to have buildings that acted as super buildings, like a iron mine that gathered both iron and gold :)

Re: New Dynamic Script Ideas

PostPosted: 04 Oct 2014, 20:17
by Strangelove
Not sure if recommended yet, but "Actions.PlayerColorChange" would be nice.

Re: New Dynamic Script Ideas

PostPosted: 04 Oct 2014, 20:38
by Michalpl
Not sure if recommended yet, but "Actions.PlayerColorChange" would be nice.
Disco color XD

Re: New Dynamic Script Ideas

PostPosted: 05 Oct 2014, 01:04
by dicsoupcan
What about my color? Yellow is nice:'(