Announcement: Be excellent to each other.


Caravel Forum : DROD RPG Boards : RPG Architecture : Stats modifier
New Topic New Poll Post Reply
Poster Message
Zeispharn
Level: Goblin
Avatar
Rank Points: 18
Registered: 12-07-2009
IP: Logged
icon Stats modifier (+3)  
When creating an hold, is it a way to change Tendry's starting stats and/or creatures stats?
08-15-2020 at 07:21 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1319
Registered: 06-13-2015
IP: Logged
icon Re: Stats modifier (+2)  
Yes, just put down a character to set the players stats in variables. Use Imperative hide stat changes first (unless you want the player to see the stat changes from default), then the variables like _HP, _ATK, _DEF and so on refer to the player's stats.

You can also use characters to make custom monsters (make it visible and set variables like _Myatk , _mydef etc.), or you can set certain variables to modify all monsters' attack, defense, etc. if you want.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 08-15-2020 07:50 PM]
08-15-2020 at 07:49 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Professor Tio
Level: Delver
Rank Points: 98
Registered: 01-30-2019
IP: Logged
icon Re: Stats modifier (+1)  
The F4 key while in the room editor can allow you to set the game's standard variables - HP, keys, and all, including "multipliers" for specific things (100 is the base 1x value). Making a creature fine-tuned to have specific stats is most likely easier to implement using a scripted NPC rather than messing with multiplier values.

____________________________
Hold stuff I guess!
Click here to view the secret text
I had an avatar at some point but then the thing stopped cooperating, ah well-
08-15-2020 at 07:52 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2366
Registered: 07-11-2014
IP: Logged
icon Re: Stats modifier (+1)  
Professor Tio wrote:
The F4 key while in the room editor can allow you to set the game's standard variables - HP, keys, and all, including "multipliers" for specific things (100 is the base 1x value). Making a creature fine-tuned to have specific stats is most likely easier to implement using a scripted NPC rather than messing with multiplier values.
Just a note, changing values via F4 applies only while testing in the editor.

If you want your starting to stats to be modified in a proper playthrough, you need to use the Character monster to set the variables as Xindaris mentioned.

[Last edited by kieranmillar at 08-15-2020 08:24 PM]
08-15-2020 at 08:22 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Zeispharn
Level: Goblin
Avatar
Rank Points: 18
Registered: 12-07-2009
IP: Logged
icon Re: Stats modifier (+1)  
Thx for these answers, but how can I explain to the game that this character with custom stats is my character?

When I play the game continue to give me a Tendry with standard stats at the "Level Entrance" point.
08-15-2020 at 08:56 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2366
Registered: 07-11-2014
IP: Logged

File: drod rpg scripting steps.png (315.8 KB)
Downloaded 82 times.
License: Public Domain
icon Re: Stats modifier (+6)  
If you've never used DROD's scripting system before, this is probably quite confusing.

The last monster in the monster list in the editor is one called Character, this is basically a thing that runs scripts.

Place one anywhere in the room and the script editor will appear. Press "Add Command". Then go to "Set Var", and assign a value to the _HP variable, or _Atk, or _Def, etc. The ones without "My" in the name refer to the player's stats and inventory, and can be modified in this way at any time. Any Character can just change the stats of the player character at any time.

Any time the player's stats change, text appears over the character's head. If you want to set starting stats, you probably don't want this to appear, so there's another script command called "Imperative" that lets you turn on and off these displayed stat changes. So add the "Hide stat changes" command before you modify players stats, then add the "Show stat changes" command at the end to resume standard behaviour (so you'll still see the numbers when you pick up health potions, etc.)

If this still didn't make a lot of sense, here's some pictures of the above steps:



[Last edited by kieranmillar at 08-15-2020 09:17 PM]
08-15-2020 at 09:15 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Zeispharn
Level: Goblin
Avatar
Rank Points: 18
Registered: 12-07-2009
IP: Logged
icon Re: Stats modifier (+2)  
@kieranmillar

Thx a lot, very clean explanation.

Last question for now, how do I change the amount given by the potion? (i.e. I want a potion that add 10hp)
08-15-2020 at 09:47 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2366
Registered: 07-11-2014
IP: Logged
icon Re: Stats modifier (+3)  
There are two ways to do that. One of which is very complicated.

The easy way: there is a variable that acts as a multiplier for all of the standard blue health potions. You change it just like you do the player's stats, by using a script's Set Var command. The variable is called _ItemHPMult. A value of 100 means 100%, and means potions will work as expected. If you change this to 67, then all blue potions will reduce the health they give by 1/3, until some other character sets it back to 100. The good news is that this means small potions will now give 10 health when the level multiplier is 1. The bad news, is that the medium and large potions will also reduce the amount of health they give by 1/3 too. If this is what you want, great! If it's not, and you instead want a custom potion, then things get a lot more complicated.

My recommendation is to press F1 in the editor to read the help files. The editor and scripting and custom characters are all documented very well. Before I make a big post explaining how to make a custom character, please read the help files and see how far you can get on your own. Playing around with DROD Script is fun, and you'll learn best that way, including accidentally learning some useful basics about programming too.

[Last edited by kieranmillar at 08-15-2020 10:24 PM]
08-15-2020 at 10:22 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD RPG Boards : RPG Architecture : Stats modifier
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.