Map Database  •  FAQ  •  RSS  •  Login

New Dynamic Script Ideas

<<

Ben

User avatar

Former Site Admin

Posts: 3814

Joined: 08 Jan 2009, 23:00

Location: California - Pacific Time (UTC -8/-7 Summer Time)

Post 06 Oct 2014, 16:51

Re: New Dynamic Script Ideas

Not sure if recommended yet, but "Actions.PlayerColorChange" would be nice.
Haha, amazing trolling tactic detected xD
I used to spam this forum so much...
<<

Strangelove

User avatar

Crossbowman

Posts: 230

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 06 Oct 2014, 16:59

Re: New Dynamic Script Ideas

Not sure if recommended yet, but "Actions.PlayerColorChange" would be nice.
Haha, amazing trolling tactic detected xD
Well, i guess it could easily be abused to troll others, but I had something different in mind lol. I would need it to separate AIs easier from each others if i really them (part of a map in my campaign). I wasn't planing for anything shady lol.
<<

Ben

User avatar

Former Site Admin

Posts: 3814

Joined: 08 Jan 2009, 23:00

Location: California - Pacific Time (UTC -8/-7 Summer Time)

Post 06 Oct 2014, 22:41

Re: New Dynamic Script Ideas

Meh, I like my idea better (6)
I used to spam this forum so much...
<<

Ben

User avatar

Former Site Admin

Posts: 3814

Joined: 08 Jan 2009, 23:00

Location: California - Pacific Time (UTC -8/-7 Summer Time)

Post 13 Oct 2014, 18:09

Re: New Dynamic Script Ideas

Can we have a script to detect the host? Could be very useful for some special gamemodes where someone needs to select settings ingame :)
I used to spam this forum so much...
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 18 Oct 2014, 14:54

Re: New Dynamic Script Ideas

I find it strange that nobody asked this yet (but I can't remember where did you post the link with the proposed features, so I can't actually check this :$ ), but can we please have an Actions.HouseLock command, to do the opposite of Actions.HouseUnlock?
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 18 Oct 2014, 18:53

Re: New Dynamic Script Ideas

I find it strange that nobody asked this yet (but I can't remember where did you post the link with the proposed features, so I can't actually check this :$ ), but can we please have an Actions.HouseLock command, to do the opposite of Actions.HouseUnlock?
HouseAllow(false) it will do the job :P
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 18 Oct 2014, 19:08

Re: New Dynamic Script Ideas

I find it strange that nobody asked this yet (but I can't remember where did you post the link with the proposed features, so I can't actually check this :$ ), but can we please have an Actions.HouseLock command, to do the opposite of Actions.HouseUnlock?
HouseAllow(false) it will do the job :P
Thank you.

I knew this (used it in Golden Cliffs - Bonus), but it disables wares' distribution for that building too, and if the unlock was supposed to be temporary then there needs to be dedicated scripting to re-enable it when the time comes in the construction tree... a HouseLock command would have none of these cons, and would in my opinion be a more elegant way of reverting HouseUnlock.
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 08 Dec 2014, 16:48

Re: New Dynamic Script Ideas

I don't know if these would be hard to implement, bet here are a few commands I'd gladly use if I could:
  • States.UnitSelected(player) and/or procedure OnUnitSelected(player, UnitID): know which unit is currently selected (or has been selected last; by using a global variable to store the value, the two things become the same)
  • States.HouseSelected(player) and/or procedure OnHouseSelected(player, HouseID): know which building is currently selected
  • Actions.ForceSelect(player, ID): force a player to select a building or unit
  • Actions.GiveUnitFromHouse/GiveGroupFromHouse: same as GiveUnit/GiveGroup, but the new unit/group comes out of a building instead of spawning on the ground
  • Actions.UnitSetCarrying(unitID, ware type) or Actions.UnitSetCarryingAndOrderWalk: give a ware to a serf; if his AI tries to find immediately a building to bring it to, then Actions.UnitSetCarryingAndOrderWalk would let the scripter decide what the serf should do with that ware before the game logic decides otherwise
  • Actions.UnitKillInHouse(unitID/GroupID, houseID): the unit (or group) is ordered to enter the building (if he's not in there already), and is then removed (without playing the "exit from building" animation first, of course, or even cancelling it if it's already playing, if possible); this, by the way, would give a way to remove Recruits from inside their Barracks without playing their "exit from building" animation first
Now, what could these commands be used for?

Well, let me explain with a few examples: I tried to make a script that would allow Allies to trade with each other using the Marketplace.
But then found out that even though I could order around a non idle civilian (by killing him, then respawning him OnUnitAfterDied and immediately using Actions.UnitOrderWalk), I couldn't get him to enter a building, nor could I give him a ware to move.

Another example: in GoldenCliffs - Bonus, one of the bonuses allows the player to recruit Barbarians... but its implementation is ugly.
With a UnitKillInHouse function, I could kill the Militia before he leaves the Barracks, and then spawn a Barbarian with GiveGroupFromHouse... way way better.

One last example: with these functions, it would be possible to fake a TPR recruiting centre in any building.
How? Simple:
  • Give the player a Barracks hidden in an unexplored area (the fog doesn't update, if the area is covered after the building is completed), and make sure it always has Leather Armors and Shields
  • When the player produces a Wooden weapon, find a serf who is idle (if there aren't, just kill a serf who is not carrying anythin and respawn him OnUnitAfterDied) and order him to enter the workshop with Actions.UnitKillInHouse
  • when he's inside and died (OnUnitAfterDied will run with his Unit Type and with the building's X and Y coordinates), respawn him inside the same building, give him the produced weapon and order him to enter your "fake recruiting centre", and remove one weapon from the workshop
  • when he's inside it and died, respawn him one last time and add the weapon to the hidden Barracks
  • When the player selects the fake recruiting centre, have him select the hidden Barracks instead
  • if he trains a Scout, kill him and have a Vagabond exit the fake recruiting centre; if he trains a Bowman, have a Rogue exit instead; and so on
I know, this last one looks complex, but keep in mind this is just an example of the possibilities... also, imagine how neat would something like this be in a campaign mission!

What do you think about this?
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

Michalpl

Sword Fighter

Posts: 318

Joined: 10 May 2014, 21:46

KaM Skill Level: Fair

Post 23 Dec 2014, 23:41

Re: New Dynamic Script Ideas

A script bool for allowing every tree to get cut?
And maybe a bool for making exhausted mountains mineable as stone?
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 24 Dec 2014, 07:13

Re: New Dynamic Script Ideas

@Michalp: These are not script ideas. These are gameplay mechanics changes, that 'could be' made scriptable after their implementation. Both answers are no, these are established elements of the game.
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
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 11 Jan 2015, 13:19

Re: New Dynamic Script Ideas

Hi!
just a short question.
possible to give images, pictures as buttons to the game for the taskbar with dynamic scripts?
For example when open the school, then there will be plus 1-2 pictures as buttons when click on it , then will happen something by dynamic scripts.
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 11 Jan 2015, 13:49

Re: New Dynamic Script Ideas

Not possible at the moment, it would be a lot of work to add that feature and allow it to be used efficiently.
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
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 11 Jan 2015, 14:07

Re: New Dynamic Script Ideas

Thanks!
<<

Michalpl

Sword Fighter

Posts: 318

Joined: 10 May 2014, 21:46

KaM Skill Level: Fair

Post 14 Feb 2015, 21:33

Re: New Dynamic Script Ideas

Actions.RegenerateAI_NavMesh it would update the mesh for AI when some tiles were changed(So AI could attack and defend when the tiles that were blocking path were gone).
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 01 Mar 2015, 09:44

Re: New Dynamic Script Ideas

Actions.UnitSetHero(UnitID, SetUnsetBoolean)
and
States.UnitIsHero(UnitID)

In the AED campaign and in special maps it would be useful to have a way to mark a particular unit as important or special.

It could be implemented as a Boolean property in KM_Units that just changes how the unit is painted in the game world (we could discuss the specific graphic change if this addition is agreed on).

What do you think about this?
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"

Return to “Ideas / Suggestions”

Who is online

Users browsing this forum: No registered users and 9 guests