Map Database  •  FAQ  •  RSS  •  Login

New Dynamic Script Ideas

<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 27 Nov 2013, 12:26

Re: New Dynamic Script Ideas

1. No, i need the unit to be selected by player, not clicking all the time. btw its working for unit kill and instalny respawn for the same position? its working for houses but not for units, i think.
2. yea i alredy do that by destroing and createing new house. - you stil need to give occupant every time.

new idea:
Actions.SelectUnitForPlayer(aPlayer, aUnit: integer)
<<

Bence791

Knight

Posts: 618

Joined: 20 Jul 2012, 20:25

KaM Skill Level: Beginner

Location: Hungary

Post 27 Nov 2013, 13:05

Re: New Dynamic Script Ideas

Tbh I don't like your new idea, RandomLyrics. It would be very bad if for example you are in combat, you have your knights selected and want to flank, the script selects ranged for you and you order your ranged to go around...
The Kamper is always taking my colour!

<<

andreus

User avatar

Sword Fighter

Posts: 343

Joined: 18 Dec 2011, 12:05

KaM Skill Level: Beginner

Website: https://github.com/andreus791/maps_feedback

Location: Russia

Post 27 Nov 2013, 13:23

Re: New Dynamic Script Ideas

agree, selecting units through script is not the best idea ;)
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 27 Nov 2013, 13:27

Re: New Dynamic Script Ideas

Tbh I don't like your new idea, RandomLyrics. It would be very bad if for example you are in combat, you have your knights selected and want to flank, the script selects ranged for you and you order your ranged to go around...
No, I have a feeling I know exactly what he wants to do. Turn based combat combined with autoselecting the next unit in fight :P
<<

Bence791

Knight

Posts: 618

Joined: 20 Jul 2012, 20:25

KaM Skill Level: Beginner

Location: Hungary

Post 27 Nov 2013, 13:32

Re: New Dynamic Script Ideas

Turn based combat combined with autoselecting the next unit in fight
Why do you need autoselect for a turn based combat? No one shall determine what I can move >.>
The Kamper is always taking my colour!

<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 27 Nov 2013, 13:56

Re: New Dynamic Script Ideas

Tbh I don't like your new idea, RandomLyrics. It would be very bad if for example you are in combat, you have your knights selected and want to flank, the script selects ranged for you and you order your ranged to go around...
lol, why you think a do such a stupid thing like that? :) If you dont want that scirpt in your map , just dont insert it in. Selecting units is important in other types of games than original kam strategy, and improves a lot the gameplay in your coustom map. Its very irritating when you have to click all the time., when it could be done easily by script.
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 27 Nov 2013, 14:02

Re: New Dynamic Script Ideas

Turn based combat combined with autoselecting the next unit in fight
Why do you need autoselect for a turn based combat? No one shall determine what I can move >.>
Did you ever play HoMM for eaxmple? The units were selected by the game (whichever unit has better morale, moves earlier; in KaM, you could make it random for example). It meant that you can only use each unit once in a "big turn" (by big turn, I mean a period of time after which, all the units were used by both players).

Anyway, seems like I was mistaken; he just wants to use this as a workaround for the fact that we don't have a proper UnitPositionSet (if we do it like I suggested, by killing an unit and spawning na new one somewhere else, the new unit will not be selected anymore).

By the way... what if we could set a hotkey with a script? :)
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 27 Nov 2013, 14:19

Re: New Dynamic Script Ideas

Yea hotkeys for event its great, you could create a Race Map or other great things :)
<<

Bence791

Knight

Posts: 618

Joined: 20 Jul 2012, 20:25

KaM Skill Level: Beginner

Location: Hungary

Post 27 Nov 2013, 14:57

Re: New Dynamic Script Ideas

Did you ever play HoMM for eaxmple? The units were selected by the game (whichever unit has better morale, moves earlier; in KaM, you could make it random for example). It meant that you can only use each unit once in a "big turn" (by big turn, I mean a period of time after which, all the units were used by both players).

Anyway, seems like I was mistaken; he just wants to use this as a workaround for the fact that we don't have a proper UnitPositionSet (if we do it like I suggested, by killing an unit and spawning na new one somewhere else, the new unit will not be selected anymore).

By the way... what if we could set a hotkey with a script? :)
Idd :o I have no idea why I thought the opposite xD Nvm.
lol, why you think a do such a stupid thing like that? :) If you dont want that scirpt in your map , just dont insert it in. Selecting units is important in other types of games than original kam strategy, and improves a lot the gameplay in your coustom map. Its very irritating when you have to click all the time., when it could be done easily by script.
Well, it would be quite an annoying way of trolling by the scripter (TDL's competition entry is too troll already :p).
The Kamper is always taking my colour!

<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 28 Nov 2013, 03:02

Re: New Dynamic Script Ideas

UnitPositionSet is problematic because the unit can be interacting with the world in many different ways when you call that command. Some examples:
- An enemy group has been ordered to attack it, should they follow the unit to the new position? What if the unit is moved somewhere they can't access?
- The unit could be in combat, after moving it will still be in combat but now the enemy will be somewhere else, and crashes will ensue.
- The unit is a serf delivering something, now it's moved off road and can't keep delivering. If it can no longer access the destination then the job needs to be given to some other serf?

...and there are lots more cases like this. Of course we can write code to handle each one of these when you call UnitPositionSet, but that's a massive amount of work and not really possible to maintain, since we'll need to keep it up to date with any changes to many other parts of the code like fighting, delivering, etc. If we do implement UnitPositionSet (or HousePositionSet) we will probably make it kill the unit and create a new one at the new location to avoid these issues. We can then copy over relevant stuff like condition, hitpoints, hotkeys, whether the player has it selected, etc. Would that still be useful?

HouseSubtractWaresTo has similar issues, if a serf is on the way to collect one of those resources, what happens? The serf will arrive, try to take the resource, and the game will crash. However, we can tell how many resources have been claimed by serfs and how many are free to be taken, so we could implement HouseSubtractWaresTo to return an Integer of the number of wares that were successfully subtracted (for example you ask it to subtract 5, but 2 are claimed by serfs coming to delver them so only 3 wares are subtracted and HouseSubtractWaresTo returns 3). People might complain that this is confusing and annoying though... What do you think?

SelectUnitForPlayer isn't a problem to implement, although as has been said it could be very annoying for the player :P I don't really think it solves the RPG teleport problem because I might not have the unit selected when it teleports, and it would be annoying if I was doing something else and the unit becomes selected.
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 28 Nov 2013, 06:32

Re: New Dynamic Script Ideas

If we do implement UnitPositionSet (or HousePositionSet) we will probably make it kill the unit and create a new one at the new location to avoid these issues. We can then copy over relevant stuff like condition, hitpoints, hotkeys, whether the player has it selected, etc. Would that still be useful?

HouseSubtractWaresTo has similar issues, if a serf is on the way to collect one of those resources, what happens? The serf will arrive, try to take the resource, and the game will crash. However, we can tell how many resources have been claimed by serfs and how many are free to be taken, so we could implement HouseSubtractWaresTo to return an Integer of the number of wares that were successfully subtracted (for example you ask it to subtract 5, but 2 are claimed by serfs coming to delver them so only 3 wares are subtracted and HouseSubtractWaresTo returns 3). People might complain that this is confusing and annoying though... What do you think?

SelectUnitForPlayer isn't a problem to implement, although as has been said it could be very annoying for the player :P I don't really think it solves the RPG teleport problem because I might not have the unit selected when it teleports, and it would be annoying if I was doing something else and the unit becomes selected.
As shown by my 2 minute-implementation, we already can have UnitPositionSet which just kills the unit. So probably not much useful.

HouseSubtractWaresTo (by the way... "to"? not "from"?) on the other hand, would be great if it was written in a way you just described. Destroying a house just to lower the number of resources is a nice workaround, but it isn't applicable to all the ideas we might have. Even such half-working subtraction would be better than that.

I disagree. You will have selected that unit in 90% of cases, because you probably moved it yourself onto the teleporting area. This, along with cinematics pan screen would make quite a seemless experience, so I'm definitely voting for that command.
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 28 Nov 2013, 15:04

Re: New Dynamic Script Ideas

SelectUnit is needed without UnitPossitionSet, when you operate only 1 units and the map is very big and has a lot of 'gates'(teleport) - without cameraCenterSet and SelectUnit it will be very anoying to click always the my same unit for 1000 times. And more, it could be fun doing some nice Army Select Syystem for player ( about 500 groups - 3000 units ) its quite imposibile to control them fast as you want or fast as the game(match) requires from you. ( and its better to have control your big army than give it to AI )
HouseSubtractWaresTo has similar issues, if a serf is on the way to collect one of those resources, what happens? The serf will arrive, try to take the resource, and the game will crash. However, we can tell how many resources have been claimed by serfs and how many are free to be taken, so we could implement HouseSubtractWaresTo to return an Integer of the number of wares that were successfully subtracted (for example you ask it to subtract 5, but 2 are claimed by serfs coming to delver them so only 3 wares are subtracted and HouseSubtractWaresTo returns 3). People might complain that this is confusing and annoying though... What do you think?
can you do the serf just stops and take a new order?
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 28 Nov 2013, 15:43

Re: New Dynamic Script Ideas

can you do the serf just stops and take a new order?
It would look pretty strange to the player if they see a serf walking along then suddenly he stops (or starts walking the opposite direction to do a different delivery). It would look like a bug where serfs forget what task they are doing.
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 28 Nov 2013, 16:22

Re: New Dynamic Script Ideas

Hmm no its desont looks strange it look exsacly like u destroy your own house when the serf coming to it :P - its the same situation
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 28 Nov 2013, 16:24

Re: New Dynamic Script Ideas

can you do the serf just stops and take a new order?
It would look pretty strange to the player if they see a serf walking along then suddenly he stops (or starts walking the opposite direction to do a different delivery). It would look like a bug where serfs forget what task they are doing.
Exactly like when you destroy a building that has/needs some wares.

Oops sorry, I can't be fast enough to respond on a phone :D

Return to “Ideas / Suggestions”

Who is online

Users browsing this forum: No registered users and 11 guests