Discuss Scratch

EpicRoka
Scratcher
67 posts

Official Monster World modding thread

Black_robot_satin wrote:

Nice to see some helpful info for modders. Way better than spending a month on seeping though the sprites to understand how things work.
(still worth it tho! )
MW Blackout was definetly worth it
WoopersRcool
Scratcher
87 posts

Official Monster World modding thread

redcat289 wrote:

WoopersRcool wrote:

I want to make a card that uses RNG to deal damage, but it should still be seeded RNG, so it's affected by the seed, so it will still be the same damage as last time if you do the same exact actions as last run. Can someone help me with this code? I put
(Script_NK3) 
and
 define RNG_Change 
with
 (Script_NK3)
inputted but it's not working, it's dealing 6,6,6,6! I need help. (sorry I'm a bad modder :[ )
What do you want the damage range to be?
umm… 3 to 12?
redcat289
Scratcher
12 posts

Official Monster World modding thread

In the “deal damage” custom block for the attack, where you would normally but the damage amount (ex 6 for a basic slash, 8 for an aqua blast, etc) put an
((((item ( 1) of [RNG_Moduli] :: list) mod (101)) mod (9)) + (3))
then add the RNG Change block after it.
EYSuperFan12
Scratcher
19 posts

Official Monster World modding thread

Hey I can't manage to find the “spawn enemies” function in the Enemies sprite, can someone help
WoopersRcool
Scratcher
87 posts

Official Monster World modding thread

redcat289 wrote:

In the “deal damage” custom block for the attack, where you would normally but the damage amount (ex 6 for a basic slash, 8 for an aqua blast, etc) put an
((((item ( 1) of [RNG_Moduli] :: list) mod (101)) mod (9)) + (3))
then add the RNG Change block after it.
ok thank you!
WoopersRcool
Scratcher
87 posts

Official Monster World modding thread

EYSuperFan12 wrote:

Hey I can't manage to find the “spawn enemies” function in the Enemies sprite, can someone help
something I do is I go into turbo warp in the original monster world to find code block sections, but if you can't do that, I think it's located near the middle of the sprite's code
EYSuperFan12
Scratcher
19 posts

Official Monster World modding thread

WoopersRcool wrote:

EYSuperFan12 wrote:

Hey I can't manage to find the “spawn enemies” function in the Enemies sprite, can someone help
something I do is I go into turbo warp in the original monster world to find code block sections, but if you can't do that, I think it's located near the middle of the sprite's code
Thanks! I'll go check it out!
WoopersRcool
Scratcher
87 posts

Official Monster World modding thread

I'm making a characters mod for monster world, but it's getting out of hand with only 3 new characters. I need a way to scroll through my characters, but that is way too complex for me. I have a temporary solution, but it doesn't work well. Please help!

Last edited by WoopersRcool (April 10, 2024 14:04:54)

TheChisKid
Scratcher
16 posts

Official Monster World modding thread

Hi everyone. I am new to the Discussion Form area of Scratch. Does anybody know how this discussion form got super popular or how I can make mine more viewed?
WoopersRcool
Scratcher
87 posts

Official Monster World modding thread

TheChisKid wrote:

Hi everyone. I am new to the Discussion Form area of Scratch. Does anybody know how this discussion form got super popular or how I can make mine more viewed?
Well, this forum is linked to a popular project, but other than that I have no idea.
TheChisKid
Scratcher
16 posts

Official Monster World modding thread

Oh ok thanks
WoopersRcool
Scratcher
87 posts

Official Monster World modding thread

Sooooo… I have a new problem in my project… (it’s shared so you can check if you need to to solve the problem) you can see it if you select a kit that gives effects like Assassin or Healer. If you hover over the effect to show what it says you can see the problem. If I did something I don't remember doing it. (even Quagsires forget things) I hope I'm not a pain.

Last edited by WoopersRcool (April 13, 2024 19:43:25)

AreYouAlbert
Scratcher
5 posts

Official Monster World modding thread

Hello, I just started trying to mod Monster world and I have a question, how do you add a new item? If anyone can tell me that would be great!
redcat289
Scratcher
12 posts

Official Monster World modding thread

AreYouAlbert wrote:

Hello, I just started trying to mod Monster world and I have a question, how do you add a new item? If anyone can tell me that would be great!
1:
add [X] to [list Player_ItemList]
Create a block like this and click on it.
2: go to the Backdrop and find the note listing every item. Add your item to the note (not necessary, but good for organization)
3: Go to the loop&startup sprite and add a block at the end of the
define 
ResetItems
block that says
replace item ( X) of [list Player_ItemList] with [0]
(Replace X with the item number, each item is identified by a number. There are 27 items in the base game, so the first item you add will have the number 28, the second 29, and so on…)
(This gets you the item right off the bat, this way you can test it easier. Remove this when you finish testing it).
4: Go to the sprite sections of the “Pen Manager” and “Status animations” sprite and draw the sprite of your item. Title it “ItemX” (X is the item number)
5: Code your Item! I would advise looking in the code to see how existing items work.
6. If you want your item to join the “normal item” pool, go to the loop&startup sprite again and go to the
define Reset Loop/Events/Deck
Scroll down until you see
if <> then
<[items] = [items]>
end
, then add
add [X] to [list Script_avaiableItems]
. If you want your item to be available via an event, then i would go to the “EventWindow” sprite and look at the existing events (sorry, i dont know events well yet).

If you have more questions please let me know.
AreYouAlbert
Scratcher
5 posts

Official Monster World modding thread

redcat289 wrote:

AreYouAlbert wrote:

Hello, I just started trying to mod Monster world and I have a question, how do you add a new item? If anyone can tell me that would be great!
1:
add [X] to [list Player_ItemList]
Create a block like this and click on it.
2: go to the Backdrop and find the note listing every item. Add your item to the note (not necessary, but good for organization)
3: Go to the loop&startup sprite and add a block at the end of the
define 
ResetItems
block that says
replace item ( X) of [list Player_ItemList] with [0]
(Replace X with the item number, each item is identified by a number. There are 27 items in the base game, so the first item you add will have the number 28, the second 29, and so on…)
(This gets you the item right off the bat, this way you can test it easier. Remove this when you finish testing it).
4: Go to the sprite sections of the “Pen Manager” and “Status animations” sprite and draw the sprite of your item. Title it “ItemX” (X is the item number)
5: Code your Item! I would advise looking in the code to see how existing items work.
6. If you want your item to join the “normal item” pool, go to the loop&startup sprite again and go to the
define Reset Loop/Events/Deck
Scroll down until you see
if <> then
<[items] = [items]>
end
, then add
add [X] to [list Script_avaiableItems]
. If you want your item to be available via an event, then i would go to the “EventWindow” sprite and look at the existing events (sorry, i dont know events well yet).

If you have more questions please let me know.
Alright Thank you so much! I definitely wouldn't have gotten that by myself
WoopersRcool
Scratcher
87 posts

Official Monster World modding thread

I'm making a characters mod for monster world, but it's getting out of hand with only 3 new characters. I need a way to scroll through my characters, but that is way too complex for me. I have a temporary solution, but it doesn't work well. Please help!
Edit: made a way

Last edited by WoopersRcool (Dec. 13, 2024 20:11:20)

Hi126785
Scratcher
18 posts

Official Monster World modding thread

Hey, I'm making a mod for Monster World, and I don't understand what the neutralskills and neutralattacks are in the Loop&Startup Sprite. Could you tell me what they mean?
WoopersRcool
Scratcher
87 posts

Official Monster World modding thread

Hi126785 wrote:

Hey, I'm making a mod for Monster World, and I don't understand what the neutralskills and neutralattacks are in the Loop&Startup Sprite. Could you tell me what they mean?
They mean what cards any character can obtain when spending a stat point to get a card.
If a card wasn't in neutralattacks or neutralskills, then that card could only be obtained by a certain character.
Like Cold Wave, it can only be obtained by Lunara, because it isn't in neutralattacks.
But Slash can be obtained by any character, because it IS in neutralattacks.
Hi126785
Scratcher
18 posts

Official Monster World modding thread

Apfellord wrote:



Hello Monster World-modders and everyone interested in becoming one!
Welcome to the official Monster World preview-version modding thread
(always work in progress)

If you're here, that means that you either already played Monster World (in which case - thank you),
or found this thread randomly in the list of discussions, in which case you might want to check out Monster World before continuing to read:

Link to the project page on the Scratch website

Have you played the game enough by now that fighting the same enemies and using the same abilities has become stale?
Do you have a really cool idea that Apfellord isn't intending on adding yet?
Or do you just want to make a super overpowered version of the game so you can finally beat the hardcore challenge?

No matter what fuels your interested to mod the game, this thread is the place to find out how and then share your remixes!

Other Monster World discussion threads:


Table of contents:
  1. Changing basic stat values
  2. Adding enemies
  3. Adding new abilities
  4. Adding Status effects (not yet written)
  5. Other random info

1. Changing basic stat values
Changing values like health, energy, level, gold and exp is really simple, because they're mostly defined by one or two variables.
Most of these variables' names start with “Player_” and are reset whenever the stage receives the broadcast “general_runstart”.

Full list of stat variable names and what they define:

(Player_Level)
Defines the current level of the player (changing this variable is mostly useless because stat points are only gained when “player_levelup” is broadcasted)

(Player_MaxExp)
Defines the maximum amount of exp you need to level up

(Player_CurExp)
Defines the current amount of exp you have (changing this directly to a value that is higher than MaxExp won't trigger a level up until you gain more Exp naturally through the variable below)

(Script_GainedExp)
Whenever this variable's value is above 0, the game will start to decrease it by 1 and increase “Player_CurExp” by 1. If through this CurExp would reach MaxExp, “player_levelup” is broadcasted.

(Player_MaxHP)
Defines the maximum amount of Health the player has.

(Player_CurrentHP)
Defines the current amount of Health the player has. (Setting this to 0 won't trigger defeat until damage is taken naturally - through an enemy attack or an ability)

(Player_Block)
Defines the amount of block you have.

(Player_MaxEnergy)
Defines the maximum amount of Energy the player holds. At the start of your turn, your energy will be replenished to be equal to this variable's value.

(Player_CurrentEnergy)
Defines the current amount of Energy you have.

(Player_GoldAmount)
Defines the amount of Gold you have.

(Player_StartingCardAmount)
Defines the amount of abilities you draw at the start of each turn.

(Battle_HandSize)
Defines the amount of abilities you can hold in your hand (any value above 7 will not only make cards go over the draw- and discard pile buttons, but will also probably break some things)

Modifying player stats (Attack, Dexterity, Intellect and Health):
The player's stats are hidden inside the List “Player_Stats_Data”. Each item of the list holds their own value for a respective stat.
(item (1 v) of [Player_Stats_Data v] :: list)
Defines how many stat points you still have left to spend.

(item (2 v) of [Player_Stats_Data v] :: list)
Defines your Attack stat.

(item (3 v) of [Player_Stats_Data v] :: list)
Defines your Dexterity stat.

(item (4 v) of [Player_Stats_Data v] :: list)
Defines your Intellect stat.

(item (5 v) of [Player_Stats_Data v] :: list)
Defines your Health stat.

You can edit these values using the
replace item ( v) of [Player_Stats_Data v] with []
(Changing the values of stats directly through this method won't trigger learning new abilities or increase your maximum health, but does enable the passive effects of having 5 or more points in a specific stat)

Modifying status effects of the player and enemies (Weakness, Vulnerability, Strength,…):
Status effect information is stored inside the lists “Player_StatusList” and “Enemy_StatusList” for the player and each enemy respectively.
Keep in mind that “Enemy_StatusList” is a local list, meaning it's unique for every enemy clone. If you use a block to edit it, that block has to be run by the respective enemy clone so that it changes its own list.

Every item in the StatusList represents the value of a specific status effect. You can find a note in the stage sprite containing the number of every status effect. Again, you can use the “replace item of list”-block to change the values of the status effects. The maximum value a status effect can have is 49 (minimum value is -49).




2. Adding enemies
First of all, huge thanks to @Black_Robot_Satin for pretty much writing this whole part!

Fortunately MW is very modular and enemies can be added without scripting every single action the enemy sprite has to do!

a) Preparation:
We will be staying in the enemy sprite for this entire tutorial.
So, let's assume that we want to add an enemy called “Pete”.
Pete is an Elite enemy, has 70 HP and gives you 60 EXP points.

To define Pete's stats add an element to each of these lists:
(the order of the elements is important, so be sure to add them as the last element in the list)

add [Pete] to [Script_EnemyNames v]
add [70] to [Script_EnemyHPValues v]
add [2] to [Script_EnemyHPBarSizes v]
Side note for HPBarSizes:
4=Boss HP Bar (needs to be hard-coded for now) | 3=Small HP Bar | 2=Medium HP Bar | 1=Large HP Bar
Currently, no enemy uses the small HP Bar. Most standard enemies have medium-sized HP Bars, while Elites have Large HP Bars.
Because Pete is an elite, we add the element “2”, so a large HP bar.


add [60] to [Script_EnemyEXPValues v]
add [20] to [Script_EnemyHeights v]
Side note for EnemyHeights:
This really depends on the enemy sprite size and defines how high the enemy intent-icon floats above the enemy. Currently, this ranges from -20 (for small enemies like Pykers) to 55 (for huge boss-sprites or flying enemies like Mantical Swarmers)


You also have to add your enemy costumes to the “Enemies”-sprite.
The naming of these costumes is very important and usually looks like this: E_001_Idle1
Because there are currently 30 enemies in Monster World (at the time this post was created), Pete's ID will be 31.
Important: Make sure you don't use the same ID for two enemies.

As you might have already seen in the above example, enemy IDs always have to have 3 digits,
so the first animation frame of Pete will be called E_031_Idle1, the second will be called E_031_Idle2 and so on…
(The current maximum amount of frames an enemy animation can have is 4.
If your enemy doesn't have any animations, that's fine. All you have to do is add the Idle1 frame in that case.)


b) Making your enemy spawn:
Enemies get instantiated (created) in the “SpawnEnemies” Custom Block.
Here, in order to spawn an enemy, the script does the following things in this order:
1. It adds the Enemy ID to the list “Battle_Turns” (E_031 in our case)
2. It changes the value of the “Script_Numberkeeper” variable to the length of the list “Battle_Turns”
3. It switches to the costume “StartingCostume_Enemy”
4. It creates a clone (which then knows what enemy it is and on what turn it has to act based on the info we just gave it)

add [E_(your enemy index number)] to [Battle_Turns v]
set [ Script_NumberKeeper v] to (length of [ Battle_Turns v] :: list)
switch costume to [StartingCostume_Enemy v]
create clone of [myself v]


If you want your enemy to spawn in an existing location (e.g. F_Grassland), go to the if-statement corresponding to that location.
First, we have to define the Random number generator script (RNG), because the game has to decide which Grassland enemies you encounter.
The reason this is done in such a complicated manner is because the game works through a seeded RNG system, not the “pick random () to ()” script.

If the location had five possible enemy setups previously,
 set [Script_NK3 v] to ((((item ( 1) of [RNG_Moduli v] :: list) mod (101)) mod (5)) + (1)) 
the block should look like this now, so you can add your own enemy setup (5 was changed to 6 - there are 6 different outcomes now).
 set [Script_NK3 v] to ((((item ( 1) of [RNG_Moduli v] :: list) mod (101)) mod (6)) + (1)) 
This block gives Script_NK3 (a simple “numberkeeper”-variable) a random value between one and the number we just changed (6).

Now add another if-else-statement to the tree of if-else-statements with the parameter <Script_NK3 = 6> (the sixth outcome we just added) and add these blocks into the if-else-statement:
 
previous blocks...
if <(Script_NK3) = [5]> then
here are the blocks for summoning a slime and a neitro
else
if <(Script_NK3) = [6]> then
wait (0.1) secs
add [E_(the index of your enemy)] to [Battle_Turns v]
set [ Script_NumberKeeper v] to (length of [Battle_Turns v] :: list)
switch costume to [ StartingCostume_Enemy v]
create clone of [ myself v]
end
end


If you want your enemy to spawn in a custom location, go to the bottom of the custom block script and add a new if-statement with the parameter
<(Map_CurrentAction) = [B_YourCustomLocationName]>
and add these blocks into the if-statement:

if <(Map_CurrentAction) = [B_YourCustomLocationName]> then
add [E_(your enemy index number)] to [Battle_Turns v]
set [ Script_NumberKeeper v] to (length of [ Battle_Turns v] :: list)
switch costume to [StartingCostume_Enemy v]
create clone of [myself v]
end


Side information for Map_CurrentAction possibilities:
B_ stands for a Boss enemy.
E_ stands for an elite fight. (always spawns a chest with an item inside after the battle)
F_ stands for the default fight.
Q_ stands for an unknown action. (triggers an event)
S_ stands for the shop.
I_ stands for the Inn.




c) Status effect on spawn:
If you want your new enemy to have a Status effect on it at the start of the battle,
go to the “DefineEnemyStats” custom block and add an if-statement with the parameter
“Enemy_ID” = (ID of your new enemy)".
Inside the if-statement, put in these blocks:

if <(Enemy_ID) = [E_{index of your enemy}]> then
replace item [{Status effect-Number}] of [Enemy_StatusList v] with [{value of the status effect}]
end

The first number represents the Status effect. There is a list of all status effect names and their index
numbers in the Stage sprite.

d) Defining enemy intents:

Now we need to define the intent pattern of our enemy.
Go to the “DefineEnemyIntent” custom block and add a new if-statement with the parameter “Enemy_IDShortened = (Index of your new enemy without any extra zeros (so 031 => 31 and 002 => 2)”.

An enemy always acts in a certain pattern. Different enemies have different pattern lengths.
Let's look at an attack pattern of an existing enemy: the slime.
 if <(Enemy_IDShortened) = [1]> then 
set [ Enemy_IntentEffectAnim] to [003]
if <(((Enemy_PlayedTurns) + (Enemy_TurnNumber)) mod (3)) = [0]> then
set [ Enemy_IntentName] to [Attack]
set Enemy_IntentValue to random between [4] and [6]
else
if <(((Enemy_PlayedTurns) + (Enemy_TurnNumber)) mod (3)) = [1]> then
set [ Enemy_IntentName] to [Block]
set Enemy_IntentValue to random between [4] and [6]
else
if <(((Enemy_PlayedTurns) + (Enemy_TurnNumber)) mod (3)) = [2]> then
set [ Enemy_IntentName] to [Attack]
set Enemy_IntentValue to random between [4] and [6]
end
end
end
end

the if-else-tree shows all the different actions this enemy will take.
  • The slime will first attack with a power of 4 to 6
  • then it will block with a power of 4 to 6
  • and finally it will attack again with a power of 4 to 6.
after that, it will start this loop again.

Here are all the different Intents an enemy can have and how to define them:

Attack:
set [ Enemy_IntentName v] to [Attack]
set Enemy_IntentValue to random between [(minimum attack power)] and [(maximum attack power)]

Block:
set [ Enemy_IntentName v] to [Block]
set Enemy_IntentValue to random between [(minimum block power)] and [(maximum block power)]

Debuff_Attack:

Applying status effects:
set [ Enemy_IntentName v] to [Debuff_Attack]
set Enemy_IntentValue to random between [(minimum attack power)] and [(maximum attack power)]
set [ Enemy_IntentInfo v] to [(name of the status effect that is given to the player)]
set [ Enemy_IntentValue2 v] to [(strength of the status effect)]

Attacking and adding Abilities to the player's Draw Pile:
set [ Enemy_IntentName v] to [Debuff_Attack]
set Enemy_IntentValue to random between [(minimum attack power)] and [(maximum attack power)]
set [ Enemy_IntentInfo v] to [AddCard]
set [ Enemy_IntentInfo2 v] to [Ability ID (Example: T001)]
set [ Enemy_IntentValue2 v] to [(How many should be added)]

Buff_Block:
set [ Enemy_IntentName v] to [Buff_Block]
set Enemy_IntentValue to random between [(minimum block power)] and [(maximum block power)]
set [ Enemy_IntentInfo v] to [(name of the status effect that the enemy applies)]
set [ Enemy_IntentValue2 v] to [(value of the status effect)]

Debuff:

Applying status effects:
set [ Enemy_IntentName v] to [Debuff]
set [ Enemy_IntentInfo v] to [(name of the status effect)]
set [ Enemy_IntentValue2 v] to [(value of the status effect)]

Adding Abilities to the player's Draw Pile:
set [ Enemy_IntentName v] to [Debuff]
set [ Enemy_IntentInfo v] to [AddCard]
set [ Enemy_IntentInfo2 v] to [Ability ID (Example: T001)]
set [ Enemy_IntentValue2 v] to [(How many should be added)]

Buff:
set [ Enemy_IntentName v] to [Buff]
set [ Enemy_IntentInfo v] to [(name of the status effect)]
set [ Enemy_IntentValue2 v] to [(value of the status effect)]

Nothing (stunned):
set [ Enemy_IntentName v] to [Stunned]

Other:

Summon enemies:
set [ Enemy_IntentName v] to [Summon]
set [ Enemy_IntentValue v] to [(How many enemies should be summoned)]
set [ Enemy_IntentInfo v] to [Enemy ID (Example: E_001)]

A few things to note:
- Currently, all status effects have to be hard-scripted inside the “initiate enemy intend” custom block, but I am planning to make this more “modular” as well by just using the Status Effect numbers
- While an enemy has their set intent pattern, what intend most enemies use is dependent on their turn number. So in the case of a Slime, Slime #1 will attack, while Slime #2 will block on turn 1. If you don't want this to happen, remove the “Enemy_TurnNumber”-variable from the following script:
<(((Enemy_PlayedTurns) + (Enemy_TurnNumber)) mod (0)) = []>
-In general, if you're looking for help with enemy intents, it's always good to look at existing enemy intent patterns




3. Adding Abilities

Adding Abilities to the game consists of these steps:
a. (Drawing and) adding the Ability costume to the “Cards”-Sprite
b. Defining the Ability's properties
c. Coding the effects for the Ability
d. Adding the Ability to the Loot table(s)

So let's start!

a) Drawing and adding your Ability costume to the “Cards”-Sprite:

First the fun part: Drawing! The inside of the card can look however you like, but there are a few design-rules Ability costumes follow, when it comes to the border of the Ability.

The gems in the top-left and bottom-right corner of each Ability indicate what type of Ability it is:



Attacks have red gems, Skills have green gems, Auras have blue gems and Statuses have dark grey gems.
As a general rule of thumb: If your Ability deals any form of direct attack damage, it should be considered an Attack.
If it does something else in the moment, it's a Skill.
If it has a lingering effect for the rest of this battle, it's an Aura.


Next, the border itself has a different color, to give some extra little info on what it belongs to:



Here you can see that neutral abilities have a light grey border, while abilities specific to Lunara have blue borders.
If an ability comes from a special item, like Cecil's KI-Saber, for example, they also have a different colored border to indicate that (in this case, green).
Since statuses come from enemies or your own abilities, they have a dark grey border to set them apart.

Now, you have hopefully drawn your Ability (in Scratch or other programs) and you're ready to add it!
To do so, add a new costume to the Sprite “Cards”.

The naming of your Ability costume is very important, as it is directly tied to the code of the game.
This is called the “Card ID”
Card IDs look like this: A001


The first letter indicates what type of Ability it is:
A for Attacks
S for Skills
P for Auras
T for Statuses

The three digits following this letter are the Card ID number.
At the moment of writing this guide, there are 35 Attack Abilities in the base game - The 35th being “A035” (Cecil's KI-Saber Attack “Vectored Blast”).
Therefore, if you were to add a new Attack to the game, you would have to call it “A036”.
Same goes for Skills (currently 30), Auras (currently 14) and Statuses (currently 5).

b) Defining the Abilities properties:

Next up, we have to open a bunch of lists and add some properties to our card, like how much it costs, what it's name is, what the effect text should say and so on.

These are the relevant lists for Attacks, for example:

(Script_Attacks_CardCosts :: list)
Defines the Cost of a card (usually 0-3)

(Script_Attacks_CardEffects :: list)
Defines what the effect text should say. If your effect has any text that changes based on the situation, that is a special case that you have to hardcode.
This includes attacks that deal damage or gain block, as the damage and block is affected by your Strength, Weakness (and Vulnerability).
To hardcode this, go into the Stage “Sprite” and scroll down a little, until you find a bunch of “replace item of list” blocks.
You'll notice quickly that these are all set up in a similar fashion, where the effect text is put together through “join”-blocks, and every attack damage value is being added to strength (item 5 of Player_StatusList) and then multiplied by Weakness (Player_WeaknessMultiplier) and Vulnerability (Script_TargetVulnerabilityMultiplier).
For the most part, you can copy one of these blocks and edit them as you please.

(Script_Attacks_CardNames :: list)
The Name of your Ability. Pretty simple stuff, there's little to do wrong here. Just pick a cool and fitting name :>

(Script_Attacks_CardTargets :: list)
Defines who this Ability targets. Currently, there are four different Target-Types:
T = Targets a single enemy (Example: Slash)
A = Targets all enemies (Example: Cold Wave)
R = Targets a random enemy (Example: Blizzard)
S = Targets yourself (Example: Block)
0 = Targets nobody - and is therefore unplayable (Example: Confused)


c) Coding the effects of the Ability:

Once you have set all the basic properties of your Ability, it's time to move on to the part that can be the most complex, depending on what your Ability should do: Coding the effect!
First of all, you have to figure this out: Who does this Ability affect?
If it is an Attack, it most likely will damage the enemy, which is why it will be mostly coded in the “Enemies”-Sprite.
Same thing if it applies a Status Effect like Poison to the Enemy.
If it has some form of Effect that affects the Player, like giving them Block or applying a Status Effect to them, then that will be coded in the “Player”-Sprite.
Both of these things can be the case, so some Abilities will have some code in the Player Sprite and some code in the Enemies Sprite.
(Note: Auras, as of yet, exclusively happen in the Player Sprite.)

Let's start with the Enemies:
Go into the Enemy Sprite and then look for a custom Block called:
define Activate Attack Card Effect ID: (CardID) Target: (TargetNumber)
(if you're coding an Attack)

or look for a custom Block called:
define Activate Skill Card Effect ID: (CardID) Target: (TargetNumber)
(if you're coding a Skill)

The contents of these custom Blocks should already give you a good idea of how this will work.
Add an if-Block checking for the CardID of your Ability and code away!

Here are some of the most common blocks to use:

Deal (round ((([(BaseDamage)] + (item (5 v) of [Player_StatusList v] :: list)) * (Player_WeaknessMultiplier)) * (Enemy_VulnerabilityMultiplier))) Damage to Enemy: [(TargetNumber)] [(DamageType)]
As this custom block implies, this deals damage to the chosen enemy (usually you just throw in the “TargetNumber” custom-block-variable in there to make it deal damage to the targeted enemy).
The DamageType at the end is usually just “Attack”, to make it trigger effects that do something when attack damage is taken.
“Effect” damage is something that is used less here.


replace item ( v) of [Enemy_StatusList v] with ((item ( v) of [Enemy_StatusList v] :: list) + ())
This Block is used to add a Status Effect to an enemy (or subtract it, if you want to), like Strength, Weakness, etc.
As mentioned previously in this guide, you can see a list of all Status Effects in the Stage Sprite, if you scroll to the right a little.
This block is usually accompanied by the code that makes the Text-Animation of the StatusEffect appear above the target's head.


add (join (Enemy_TurnNumber) [001]) to [Anim_Effects_Queue v]
This adds a cosmetic Ability Animation to the Effect. In this case, the local Variable “Enemy_TurnNumber” is being used to make the Animation appear on top of the targeted Enemy. If you want it to appear over the Player, use “1” here.
The three following digits are the ID of the Ability Animation. You can check inside the sprite “AbilityAnimations” to see which Animation has which number.
(The basic slashing Animation is 001, for example, while a poison cloud is 006).

change [Player_Block v] by (round (([Base Block value] + (item (5 v) of [Player_StatusList v] :: list)) * (Player_WeaknessMultiplier)))
This adds Block to the Player.

change [Script_DrawCardQueue v] by ()
This draws cards.
To add specific cards or draw cards with specific Properties, check Chapter “5. Other random info”, at the bottom of this guide.


Now, if you're coding something that affects the Player, go into the “Player”-Sprite and look for similar custom Blocks.
In general, if you want to learn more about how to code your Ability, it is always a good idea to check out how the already existing Abilities are coded.


d) Adding the Ability to the Loot table(s):

Now for the last step!
In the “Loop&Startup” Sprite, there's a custom block called “Reset Loot/Events/Deck”.
In there, you can probably already see that I ordered the cards being added to the loot tables and the player starting deck.
You can just copy one of the “add to list” blocks and change the name of the card being added to match the card ID of the card you made.
And that's it! It should appear in the starting Deck or in the “Learn a new Ability”-Menu, depending on where you added it to.


5. Other random info

Adding Abilities to your Hand/drawing Abilities:

If you want to draw an Ability (from your Draw Pile) or add a specific Ability to your Hand, you use the following two blocks:



As you can see, the “DrawCard_Properties” list items have two digits, the first one is for reducing cost of the drawn ability (can be set to 0-9).
The second digit can only be 0 or 1. If it is set to 1, then the card will always cost 0. (Items like Winged Boots use this)

It's absolutely essential that an item is added to both “DrawCard_Queue” and “DrawCard_Properties”, as the game will only draw/add an ability if both those lists contain the same amount of items.



Hey Ap, in the project when I was modding it, the names for the enemies didn't work unless you have them in all caps, and in the tutorial, it has “Pete” in normal capitalization.
Hi126785
Scratcher
18 posts

Official Monster World modding thread

WoopersRcool wrote:

Hi126785 wrote:

Hey, I'm making a mod for Monster World, and I don't understand what the neutralskills and neutralattacks are in the Loop&Startup Sprite. Could you tell me what they mean?
They mean what cards any character can obtain when spending a stat point to get a card.
If a card wasn't in neutralattacks or neutralskills, then that card could only be obtained by a certain character.
Like Cold Wave, it can only be obtained by Lunara, because it isn't in neutralattacks.
But Slash can be obtained by any character, because it IS in neutralattacks.
Thanks a lot!

Powered by DjangoBB