Map Database  •  FAQ  •  RSS  •  Login

Dynamic Script Usage Questions

<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 20 Jul 2014, 21:53

Re: Dynamic Script Usage

A bs question to devs: would it be possible to add one of the two heart UTF symbols (heavy black heart hex 2764, black heart suit hex 2665) to the KaM overlay font? I wanted to use the symbol for showing lives count (as in, health - you die once, the script takes away 1 "heart" from the overlay, you lose all the lives - you lose the entire game) in the overlay on one of my maps, but it didn't work - I tried to use #X (where X is decimal symbol of the UTF character) which works for another more common character, so I guess it's a question of availability of the character.
<<

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 21 Jul 2014, 02:30

Re: Dynamic Script Usage

A bs question to devs: would it be possible to add one of the two heart UTF symbols (heavy black heart hex 2764, black heart suit hex 2665) to the KaM overlay font? I wanted to use the symbol for showing lives count (as in, health - you die once, the script takes away 1 "heart" from the overlay, you lose all the lives - you lose the entire game) in the overlay on one of my maps, but it didn't work - I tried to use #X (where X is decimal symbol of the UTF character) which works for another more common character, so I guess it's a question of availability of the character.
Yeah those characters are not in our fonts. I guess we could add the entire Miscellaneous Symbols block, it probably won't increase texture RAM usage by a noticeable amount (256 extra symbols compared to ~20k that Chinese adds). Anyone else have an opinion or suggestion for unicode symbols we need to add?
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 21 Jul 2014, 04:56

Re: Dynamic Script Usage

Sounds like a good idea, since now we have Unicode fornts, we might as well include characters that will enrich European locales :)
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
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 03 Aug 2014, 09:37

Re: Dynamic Script Usage

kamrepos/map.php?id=127

Why procedure OnHouseDestroyed doesn't work in current RC? Try to launch the map with a bot as an enemy, and destroy the enemy building near your troops. It should log some stuff in Remake logs (and lower the building count in the overlay too) but it doesn't. Why? Is there a known issue about this or something changed? I think this code worked in 5503 (sadly don't have that one installed here to check)
<<

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 03 Aug 2014, 14:26

Re: Dynamic Script Usage

kamrepos/map.php?id=127

Why procedure OnHouseDestroyed doesn't work in current RC? Try to launch the map with a bot as an enemy, and destroy the enemy building near your troops. It should log some stuff in Remake logs (and lower the building count in the overlay too) but it doesn't. Why? Is there a known issue about this or something changed? I think this code worked in 5503 (sadly don't have that one installed here to check)
Seems to work fine for me. I get this line in the log:
00:24:45:854 84.038s 12564ms Script houseid 10075451 destroyer 0
I destroyed the woodcutter at the top of the map (I started in the top left).
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 03 Aug 2014, 18:24

Re: Dynamic Script Usage

Did the buildings count in overlay change too?
<<

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 04 Aug 2014, 03:00

Re: Dynamic Script Usage

Did the buildings count in overlay change too?
No it didn't (still says 11 for both), but the message appears in the log so the error must be in your script. Actually two lines appear in the log:
12:58:10:748 75.955s 12137ms Script houseid 6782715 destroyer 1
12:58:10:748 75.955s 0ms Script team1 10 team2 11
<<

pawel95

Castle Guard Swordsman

Posts: 1912

Joined: 03 Oct 2008, 22:00

KaM Skill Level: Skilled

Location: "Pawel95" on Youtube.com

Post 28 Aug 2014, 16:33

Re: Dynamic Script Usage

IS there a possiblity to read out when a player sets a Beacon? I had a discussion with Random. In dota if you play with an AI player and you ping on an enemy, he attacks with you. If you press the ping in the direction where no enemy is and you move also back, he moves behind you. It would be cool to have such a possibility also in the Remake. There are quite some cool 2vs2 maps that could be played with AI but the ai doesn´t understand when the best moment is, to attack e.g. :mrgreen:
<<

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 29 Aug 2014, 01:32

Re: Dynamic Script Usage

IS there a possiblity to read out when a player sets a Beacon? I had a discussion with Random. In dota if you play with an AI player and you ping on an enemy, he attacks with you. If you press the ping in the direction where no enemy is and you move also back, he moves behind you. It would be cool to have such a possibility also in the Remake. There are quite some cool 2vs2 maps that could be played with AI but the ai doesn´t understand when the best moment is, to attack e.g. :mrgreen:
I think we can added OnBeacon(Player, X, Y) :)
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 29 Aug 2014, 04:16

Re: Dynamic Script Usage

@Pawel95: That's a good idea :)
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
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 06 Sep 2014, 14:19

Re: Dynamic Script Usage

I'm trying to modify the map Atoll to have customizable armies, but I'm having two problems:
When using "States.MarketFromWare(States.HouseAt(5,4))", I get the error "Unknown identifier 'MARKETFROMWARE' " , while using "Actions.UnitKill(States.UnitAt(5,7),1)" causes the error "Type mismatch".

I'm using r5503

Any help, please?

EDIT: Alright, it seems that I had no idea of what a BOOLEAN actually is.
Using "Actions.UnitKill(States.UnitAt(5,7),TRUE)" gives no error.

EDIT2: Googled MarketFromWare, and as far as I understood this function is not in r5503, as it was added later... can anybody confirm this, please?
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"
<<

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 07 Sep 2014, 01:21

Re: Dynamic Script Usage

EDIT: Alright, it seems that I had no idea of what a BOOLEAN actually is.
Using "Actions.UnitKill(States.UnitAt(5,7),TRUE)" gives no error.
Yes, booleans are either true or false.
EDIT2: Googled MarketFromWare, and as far as I understood this function is not in r5503, as it was added later... can anybody confirm this, please?
That's correct, it was added after r5503. We're beta testing the upcoming release, so if you send us an email (contact@kamremake.com) I will add you to our beta tester mailing list so you have access to the beta versions.
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 07 Sep 2014, 06:52

Re: Dynamic Script Usage

EDIT: Alright, it seems that I had no idea of what a BOOLEAN actually is.
Using "Actions.UnitKill(States.UnitAt(5,7),TRUE)" gives no error.
Yes, booleans are either true or false.
EDIT2: Googled MarketFromWare, and as far as I understood this function is not in r5503, as it was added later... can anybody confirm this, please?
That's correct, it was added after r5503. We're beta testing the upcoming release, so if you send us an email (contact@kamremake.com) I will add you to our beta tester mailing list so you have access to the beta versions.
Alright, thank you.
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 Sep 2014, 15:22

Re: Dynamic Script Usage

Quick question: do Dynamic Scripts support file writing/reading?
For example, if someone wanted to keep track of a player's army across multiple missions, would it be possible to store and load values in and from an external file?
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 08 Sep 2014, 15:35

Re: Dynamic Script Usage

Quick question: do Dynamic Scripts support file writing/reading?
For example, if someone wanted to keep track of a player's army across multiple missions, would it be possible to store and load values in and from an external file?
No ;/ but that could be nice option, for example if u complete quest from mission 1 ull get 10 barbarians in mission 2 or smth like that :>

Return to “Dynamic Scripting”

Who is online

Users browsing this forum: No registered users and 5 guests