Comments

Log in with itch.io to leave a comment.

Viewing most recent comments 1 to 9 of 100 · Next page · Last page

Hey yal. Me again, how to use key item. I need to use spesific key item so I need to call variable to that specific key item to use in script

Fundamentally, all items work the same and the category is just for sorting. You just need to give the key item a validflag for using in field, a use_script and an use_arg and it should become usable. The actual functionality would be in the use_script, and if you don't need the use_arg you can just ignore it in the script.

(Check out init_items if that explanation didn't make sense)

oh okey, can you give me example code that check if i have a 2 potion in my inventory to perform a script

I'm reading your question as "you need to find 2 separate potions to unlock a cutscene" and then you'd do something like,

if(inventory_has_item(FIRST_POTION) && inventory_has_item(SECOND_POTION)){
  csc_enqueue( ... ) //stuff from the good cutscene where you cure the sick grandma)
}
else{
  csc_enqueue( ... ) //stuff from the bad cutscene where you're told you need to find both the potions
}

If it's two of the same potion you'd use inventory_has_item(POTION,2) (it can check for specific quantity)

(+1)

thanks yal, finally work

(1 edit)

Pertanyaan lain, bagaimana cara mengatur item spesifik yang hilang setelah digunakan dengan cara yang sederhana? Saya masih belum mengerti skrip kehilangan item inventaris. Terlalu rumit bagi saya.

(+1)

nevermind fix it 😀

Hallo Yal! Just a general question, how would I go about making special move effect logics in a relatively simple way? Such as incorporating move priority, attack heals for a percentage of the damage, or (de)buffing more than one stat at a time, etc.

(1 edit)

For priority, I would add a new parameter to init_move for move priority (which is 0 for all moves that doesn't have a priority) and then when you action_slate the move, add some big number times the move's priority to the speed-priority parameter. There's three places move-actions are slated: mev_battle_attack_select, mev_battle_attack_select_target, and obj_battlecontrol's step event. (There's already cases where actions are slated with higher priority, like when using a consumable item in battle, so the only thing that's missing is a bonus priority value from the move data)

For "attack heals for a percentage of damage" I would add a new side-effect type called "movespfx_LIFESTEAL" and give to those moves, special effects are handled in obj_battlecontrol's step event (search for "mvd_SIDEEFFECT_TYPE" to find where it's processed) and this is where you'd add the logic to heal the user based on how much damage the target took (the user's ID is in a_user). You can access the amount of damage dealt through n.my_dmg (the obj_damageapply created in the Damage block) though you'd probably want to save it in its own variable that's always initialized to 0 (in case the damage block gets skipped due to the move having 0 power n.my_dmg does not exist which will lead to a game crash if you try accessing it).

For multiple buffs/debuffs i would do something similar, add new side effect types for multiple buff/debuffs, and for these the mvd_SIDEEFFECT_SUBTYPE slot of the movedata would be an array:

[50,    movespfx_MULTIDEBUFF,        [stat_DEF,stat_RES],        1]

Applying these would be very similar to the current buff/debuff code but you loop over the "stat" value (since it's an array).

...actually, you could probably just turn the regular buff/debuff cases into loops in case an array is passed into them (use is_array to check), and avoid the extra work of having separate multibuff/debuff values.

Hai yal, me again. How to easily add fishing system ini this engine? I mean not only fishing a monster but sometime  item to

If you want a Palworld-style instant success when fishing a monster, you can give the player a new monster anywhere you want by getting the first free party ID with amp_get_new_party_idamp_get_new_box_id and then use amp_generate_monster to fill it with monster data. So when you successfully clear the fishing minigame you'd do this and then show a little announcement about it.

If you instead want to trigger a battle when fishing up a monster, the code in player_step_fill shows how to trigger a random encounter (though you'd probably wanna use a different list of monsters than the area's regular encounter table when picking which monster you fight).

(1 edit)

Thanks yal.  yeah it work, but problem come when the party is full. How to fix this? Also monster nickname

For party is full, use amp_get_new_box_id to get a box slot if the party is full (amp_get_new_party_id returns NONE if there's no free slots)

Use msh_spawn_namingmenu to spawn a nickname menu. You can see how it's used in mev_battle_catch_nickname (note how it assigns the my_monster variable to the AMP slot the monster was placed in)

i still has problem with this, because I don't understand which script i used first, get monster to the party or rename it? Can you give me the example code? 

(+1)

thank yal but it fix now, i just need script to check empty party and box now

Another question, i tried to change the size of monster move bar gui at the battle but i cant find it how. Same happen with chosen gui at the shrine. Can you guide me how? 

The move list in battle is set up by mev_battle_attack.

I don't understand what you mean with "chosen GUI at the shrine" but the terminal menu is set up by msh_terminal_load_page.


Both of these have comments for what each block of code does (e.g. "Frame with type/MP info") so hopefully it should be easy to figure out how to change the parts you want to change.

Thank yal fix the gui battle move, but the gui i mean in the shrine was dialog box that pooped with option such as heal and other. I wanna to change that to

Ah, got it.

Currently it uses the cc_question cutscene command (which is shared between all multichoice questions) so my recommendation would be to copy that to a new script cc_shrinequestion and then edit that to create the menu the way you want.

Hei. Me again, what is the best way to add virtual key at this engine. I try but sometime they vanish at some place

Are you spawning the virtual keys offscreen perhaps? All of the menus draw themselves in the Draw GUI event (GUI layer) to avoid having to think about that, be careful not to use the x / y position of menu objects (which is not used) but instead check the coordinates of the GGUI frames / GGUI elements, which are in GUI coordinates.

(Also, are you using the Game Maker virtual keys system or making your own?)

(1 edit)

Any plans to update any further? Like add more features and such?

Not really, adding more features also makes it more complicated to use. (Though if you check the comments I have suggested implementations for a lot of commonly requested features)

Hey Yal can you help me with making abilities so far i have initialized them the same way you have monsters and items, but i cannot seem to understand how those work also i am having trouble drawing them in the status menu, how do i do that.

So far i have done this :

function init_ability(argument0, argument1, argument2, argument3, argument4, argument5, argument6 ,argument7) {

global.ability_data[argument0,abl_NAME ] = argument1

global.ability_data[argument0,abl_TRIGGER ] = argument2

global.ability_data[argument0,abl_TARGET1 ] = argument3[0]

global.ability_data[argument0,abl_CHANCE1 ] = argument3[1]

global.ability_data[argument0,abl_TYPE1 ] = argument3[2]

global.ability_data[argument0,abl_EFFECT1 ] = argument3[3]

global.ability_data[argument0,abl_SEVERITY1 ] = argument3[4]

global.ability_data[argument0,abl_TARGET2 ] = argument4[0]

global.ability_data[argument0,abl_CHANCE2 ] = argument4[1]

global.ability_data[argument0,abl_TYPE2 ] = argument4[2]

global.ability_data[argument0,abl_EFFECT2 ] = argument4[3]

global.ability_data[argument0,abl_SEVERITY2 ] = argument4[4]

global.ability_data[argument0,abl_WEAKNESS1 ] = argument5[0]

global.ability_data[argument0,abl_WEAKNESS2 ] = argument5[1]

global.ability_data[argument0,abl_WEAKNESS3 ] = argument5[2]

global.ability_data[argument0,abl_IMMUNITIES1 ] = argument6[0]

global.ability_data[argument0,abl_IMMUNITIES2 ] = argument6[1]

global.ability_data[argument0,abl_IMMUNITIES3 ] = argument6[2]

global.ability_data[argument0,abl_STRENGTHEN1 ] = argument7[0]

global.ability_data[argument0,abl_STRENGTHEN2 ] = argument7[1]

global.ability_data[argument0,abl_STRENGTHEN3 ] = argument7[2]

}

/// init_abilities()

function init_abilities() {

init_ability(abl_FLAMECLOAK, "Flame Cloak", EMERGE,

[movetarg_USER, 100, type_FIRE, ailment_BURN, 1],

[NONE,NONE,NONE,NONE,NONE],

[NONE,NONE,NONE],

[NONE,NONE,NONE],

[NONE,NONE,NONE]

);

}

#region//ability region

#macro abl_NAME 1

#macro abl_TRIGGER 2

#macro abl_TARGET1 3

#macro abl_CHANCE1 4

#macro abl_TYPE1 5

#macro abl_EFFECT1 6

#macro abl_SEVERITY1 7

#macro abl_TARGET2 8

#macro abl_CHANCE2 9

#macro abl_TYPE2 10

#macro abl_EFFECT2 11

#macro abl_SEVERITY2 12

#macro abl_WEAKNESS1 13

#macro abl_WEAKNESS2 14

#macro abl_WEAKNESS3 15

#macro abl_IMMUNITIES1 16

#macro abl_IMMUNITIES2 17

#macro abl_IMMUNITIES3 18

#macro abl_STRENGTHEN1 19

#macro abl_STRENGTHEN2 20

#macro abl_STRENGTHEN3 21

#endregion

I think the easiest way to figure out how to implement abilities would be running a search (Ctrl+Shift+F) for itemvalidflag_AUTO_, this should bring up all the places where items are automatically triggered (e.g. the Spiked Shell being triggered on damage to deal a counter attack... you'd want a similar check for abilities being triggered on damage at basically the same place, for things like Flash Fire, Sturdy and so on; other abilities might trigger on each turn, or when attacking, etc)

You'll also need to actually give abilities to monsters (so init_monster needs to take a new argument for ability, the global.monster_data array be extended so it can fit this new data in, and the giant setup in init_monsters should provide it of course)

To show the ability, mev_pause_monsters_status is the script that builds the status screen. You'd read out the abl_NAME field here and create a ggui_element_text to display it somewhere.

Hey Yal, can you help me with a few things : 

1.How can I delete save files

2.How do i enable double battles for certain trainers

3.How do i set encounters for the room, i found ects_placeholder() but I could not find out how it applied and how to make more

thank you

1) Savefiles are found in AppData/Local/<name you saved the GM project under>, monster_save0 is the first file, monster_save1 the second and so on. It's a hidden folder so the easiest way to find it is to type in %LOCALAPPDATA% in the file explorer path and hit enter.

2) The important part is setting global.player_side_monsters and global.enemy_side_monsters to 2 (that's what controls how many monsters each side is allowed to have at once). The easiest way to inject this would be to copy obj_npc_trainer and cc_battlestart_trainer to new obj_npc_doublebattletrainer/cc_battlestart_doublebattletrainer which are mostly identical but sets these to 2 instead of 1 before the fight starts. (Also note that cc_battlestart_trainer actually can take an array of trainer data, global.encounter_trainer_data has one entry per trainer, so if you want a double battle against specifically two different trainers (instead of an entity like 'twins') you could populate this twice with different monster, dialogue etc data for each trainer.

3) Use an obj_encounterzoneselector, place one in the room and stretch it out over the area you want the battles in and then select the ects_* script with that room's settings (there's two more ects_* scripts with the first town / Driftwood Forest encounter data). They're tied to these markers so you can make things more granular (e.g. have different encounters in different terrain)

Viewing most recent comments 1 to 9 of 100 · Next page · Last page