RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Adding a new character stat(Some questions about)

0 Members and 1 Guest are viewing this topic.

pokeball DkoOffline
**
Rep: +0/-0Level 88
Ive found that to create the CBS that I want that I need to give my characters and monsters one more stat. The thing is my mind is hurting trying to figure out all the little things that would need to be done to do it. One I don't know where the code is to figure out what happens when a character levels up so the stat is changed accordingly. Second I'm trying to figure out what I need to do to properly save this new stat. I know all others are saved to Actors.rxdata but I don't think I should save it there. Also why are things seemingly saved with Marshal.dump instead of save_data?(I know the help files says that this is to be expected but why?)> Thank you for any help in advance. I just have a horrible time figuring out other peoples code.

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
what type of stat? sorta like Strenght or like a skill?
Watch out for: HaloOfTheSun

pokeball DkoOffline
**
Rep: +0/-0Level 88
Like Str. When I get done I want to use it as a way to figure out how many commands a person can input per attack. It goes up with a persons level so they get to do more at higher levels. Think the system that Xenogears has when you attack. But thats not really important to my questions I think.

***
Rep:
Level 88
Gone.
ohhhh i see, try googling it
Good Bye. RMRK you were cool while I wasn't there.

pokeball DkoOffline
**
Rep: +0/-0Level 88
ok tried it. Got nothing.

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
maybe you can mess with this tut I found:
For this tut I will use a skill named ‘Wood Cutting’

You will need:

2 common events:
Wood Cutting Level
Random Woodcutting Exp Gain

1 Switch:
Wood Cutting Available

An item, named ‘Wood Cutting Axe’ and don’t make it consumable

And 3 Variables:
Wood cutting Level
Wood Cutting Exp
Wood Cutting Exp Gain

At the start of your game or wherever you want the wood cutting skill to begin, activate the switch: Wood Cutting Available

Ok, let’s begin.
Make the common event with a parallel process to the switch ‘Wood Cutting Available’. Name it Wood Cutting Level and do the following:
<>Conditional Branch: Variable [001: Wood Cutting Exp] >= 0
<>Variable: [002: Wood Cutting Level] = 0
<>
<>Conditional Branch: Variable [001: Wood Cutting Exp] >= 96
<>Variable: [002: Wood Cutting Level] = 1
<>
Else Handler
<>Conditional Branch: Variable [001: Wood Cutting Exp] >= 237
<>Variable: [002: Wood Cutting Level] = 2
<>
Else Handler
<>Conditional Branch: Variable [001: Wood Cutting Exp] >= 493
<>Variable: [002: Wood Cutting Level] = 3
<>
Else Handler
<>………………………………………

So you see the pattern, good!
You can make as many levels as you want but remember, the higher the level, the more Exp required to gain the next level and so on! And on the last level you want, do not use an Else Handler.


Ok, make another Common event named Random Wood Cutting Exp Gain and leave the trigger as none.
So, now do the following:

<>Variable: [003: Random Woodcutting Exp Gain] = Random (1..10)
(Note, you can use any amount of random numbers to make the chance of getting the same amount of Exp again and again even less)
<>Conditional Branch: Variable: [003: Random Woodcutting Exp Gain] == 1
<> Variable: [001: Wood Cutting Exp] += 13
<>
Else Handler
<>Conditional Branch: Variable: [003: Random Woodcutting Exp Gain] == 2
<> Variable: [001: Wood Cutting Exp] += 11
<>
Else Handler
<>Conditional Branch: Variable: [003: Random Woodcutting Exp Gain] == 3
<>Variable: [001: Wood Cutting Exp] += 14
Else Handler
<> …………………………

Again, see the pattern? Continue this until you have used all of the possibilities for the random numbers. And on the last one, do not use an Else Handler!
Once you are done, Make sure you make the final command ‘End Event Processing’ otherwise it won’t stop generating numbers and give you an infinite amount of Exp.


Next step, you make a tree and make it an event which only activates when you have the item ‘Wood Cutting Axe’. So when you press enter on the tree, make the sprite change into a tree stump and then use the command ‘Common Event’ and call ‘Random Wood Cutting Exp Gain’

Don’t forget to make it that once a tree has been chopped down, you can not chop it again, (until you re-enter the map or something, or if you have a day/night system, the tree returns the next day).
Watch out for: HaloOfTheSun

pokeball DkoOffline
**
Rep: +0/-0Level 88
Thanks but that doesn't really help me as im adding stats. Not skills.

**
Rep: +0/-0Level 88
CHEESE IS TASTY
AAAAH! it sounds like runescape. it better not be something based on runescape... lol that game is terrible.
"Death be not proud. Though some have called thee mighty and dreadful... thou art not so." CoB-HC!!

*****
Rep:
Level 89
I'm back again. Again.
What stat do you want to add?

pokeball DkoOffline
**
Rep: +0/-0Level 88
I wants to add a stat called Stamina. It will be represented in my battle system as a bunch of little boxes. The character up for attack can do a strong, medium or light hit  which take up 3, 2, or 1 stamina respectively. Stamina will also increase as you level up. I have gotten much further but im stumped now. I need to have write access to the database (specifically @parameters) but I don't know how to do it.

***
Rep:
Level 88
Gone.
i wish i hadn't played runescape to level 107 and then find world of warcraft
Good Bye. RMRK you were cool while I wasn't there.