Map Database  •  FAQ  •  RSS  •  Register  •  Login

New Dynamic Script Ideas

<<

andreus

User avatar

Sword Fighter

Posts: 343

Joined: 18 Dec 2011, 12:05

Location: Russia

KaM Skill Level: Beginner

Post 24 Jul 2014, 16:03

Re: New Dynamic Script Ideas

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

RandomLyrics

User avatar

Sword Fighter

Posts: 297

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 25 Jul 2014, 15:33

Re: New Dynamic Script Ideas

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 :)
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3821

Joined: 16 Sep 2007, 22:00

Location: Australia

KaM Skill Level: Skilled

Post 26 Jul 2014, 01:48

Re: New Dynamic Script Ideas

RandomLyrics wrote:OnGroupOrderAttackHouse(aGroup, aHouse: integer)
OnGroupOrderAttackUnit(aGroup, aUnit: integer)
OnGroupOrderLink(aGroup, tGroup: integer)

Accepted.

RandomLyrics wrote: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?
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 297

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 26 Jul 2014, 12:16

Re: New Dynamic Script Ideas

Lewin wrote: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 :)
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 297

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 01 Aug 2014, 20:57

Re: New Dynamic Script Ideas

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

The Dark Lord

User avatar

King Karolus Servant

Posts: 2152

Joined: 29 Aug 2007, 22:00

Location: In his dark thunderstormy castle

KaM Skill Level: Veteran

Post 27 Sep 2014, 17:37

Re: New Dynamic Script Ideas

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

sado1

User avatar

Council Member

Posts: 1396

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 27 Sep 2014, 21:31

Re: New Dynamic Script Ideas

TDL: I quote you there, seems like it's not only scripting-related... viewtopic.php?p=40829#p40829
<<

Ben

User avatar

Council Member

Posts: 3806

Joined: 08 Jan 2009, 23:00

Location: California GMT - 8 (Standard Time)

KaM Skill Level: Beginner

Post 01 Oct 2014, 19:24

Re: New Dynamic Script Ideas

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!)
#thunderposting #greentornado
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3821

Joined: 16 Sep 2007, 22:00

Location: Australia

KaM Skill Level: Skilled

Post 02 Oct 2014, 01:26

Re: New Dynamic Script Ideas

Ben wrote: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.
<<

Krom

User avatar

Knights Province Developer

Posts: 3237

Joined: 09 May 2006, 22:00

Location: Russia

KaM Skill Level: Fair

Post 02 Oct 2014, 05:10

Re: New Dynamic Script Ideas

@Ben: Why would you need that? :)
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Michalpl

Sword Fighter

Posts: 318

Joined: 10 May 2014, 21:46

KaM Skill Level: Fair

Post 02 Oct 2014, 13:22

Re: New Dynamic Script Ideas

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

Ben

User avatar

Council Member

Posts: 3806

Joined: 08 Jan 2009, 23:00

Location: California GMT - 8 (Standard Time)

KaM Skill Level: Beginner

Post 02 Oct 2014, 17:12

Re: New Dynamic Script Ideas

Lewin wrote:
Ben wrote: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 :)
#thunderposting #greentornado
<<

Strangelove

User avatar

Crossbowman

Posts: 230

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 04 Oct 2014, 20:17

Re: New Dynamic Script Ideas

Not sure if recommended yet, but "Actions.PlayerColorChange" would be nice.
Love the Bomb!

Campaign viewtopic.php?f=5&t=1749
MultiplayerMaps viewtopic.php?f=5&t=2302
AutoComplete viewtopic.php?f=32&t=2722
<<

Michalpl

Sword Fighter

Posts: 318

Joined: 10 May 2014, 21:46

KaM Skill Level: Fair

Post 04 Oct 2014, 20:38

Re: New Dynamic Script Ideas

Strangelove wrote:Not sure if recommended yet, but "Actions.PlayerColorChange" would be nice.


Disco color XD
<<

dicsoupcan

Moorbach's Guard

Posts: 1314

Joined: 12 Feb 2012, 21:36

KaM Skill Level: Fair

Post 05 Oct 2014, 01:04

Re: New Dynamic Script Ideas

What about my color? Yellow is nice:'(
You have enemies? Good. That means you've stood up for something, sometime in your life. ~ Winston Churchill
PreviousNext

Return to Ideas / Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests