[XP] Blizz-ABS

Started by Blizzard, January 09, 2008, 08:21:56 am

Previous topic - Next topic

wolfspirit

Right... I've putted the weapon sprite on the character...  :^_^':
But just to be shure,... the atk1 has to be the char.+weap./ the wpn only the weap.(duh... :innocent:)/ wpnGame_player just the same as atk1?

Blizzard

atk has to be just the character, wpn has to be just the weapon. It's the same for all actor regardless of whether being controlled by the player or by the AI.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

Two questions:
Is it possible to add an option for actor_name_hrt so it displays the sprite when he gets hurt?
Also how do we make summons/caterpiller actors go through everything aka like a summoned bird for example.

legacyblade

Is it possible to have certain summons drop an item when they are unsummoned (when their time runs out)? In my game, the closest thing to summoning is a mechanic through which you can use your mana to grant temporary life to objects. I want these items to drop to the ground when their summon time runs out.

Enigma

Just Recently started using Blizz system, its pretty good
I have a problem though
I want to know how to have the HUD off from the beginning of the game rather than having to turn it off
also when I turn it off via call script it shuts off the message windows so they don't come on even by auto run

Blizzard

Quote from: game_guy on December 05, 2009, 04:33:19 pm
Two questions:
Is it possible to add an option for actor_name_hrt so it displays the sprite when he gets hurt?
Also how do we make summons/caterpiller actors go through everything aka like a summoned bird for example.


_hit sprites are already planned, I just never came around to make them so far.
There's a method call in BlizzABS::Processor#skillitem_process somewhere.

Quote from: legacyblade on December 05, 2009, 05:21:21 pm
Is it possible to have certain summons drop an item when they are unsummoned (when their time runs out)? In my game, the closest thing to summoning is a mechanic through which you can use your mana to grant temporary life to objects. I want these items to drop to the ground when their summon time runs out.


Are they items from the database or simply lifeless objects? Latter could be done by combining events and scripts when I add the event creation script call.

Quote from: Enigma on December 06, 2009, 03:15:35 am
Just Recently started using Blizz system, its pretty good
I have a problem though
I want to know how to have the HUD off from the beginning of the game rather than having to turn it off
also when I turn it off via call script it shuts off the message windows so they don't come on even by auto run


There's a problem with RMXP. Don't use

xyz = false


Use this instead:

xyz =
false

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

wolfspirit

Okay you guys I have a question...
Ahum, Is it possible to call a switch as soon as a specified enemy died?
If so... How?

Subsonic_Noise

Before Blizz reads this and gets all angry and stuff: It's in the manual. Look up Custom Triggers or something, there should be one that triggers the enemies event code after he died. Then just add the event code to call a switch and there you go, it will activate as soon as the enemy dies.
I actually even think the event code runs when the enemy dies when you don't add a custon trigger, I'm not sure though.

Blizzard

What Sub said. And yes, death trigger is on by default when no other trigger is specified.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

wolfspirit

Great!
Thanks,... again. :P

legacyblade

@blizz, it's items from the database. For example, you can use a Miracle (spell that grants life temporarily) to bring to life one of your sword. This, in essence, would "summon" a floating sword by consuming one from your inventory (which I already know how to do). However, when the Miracle runs out, the sword goes back to normal and falls to the ground. (you can then pick it back up). You can also use this spell to bring certain lifeless objects on the map to life to fight for you, but that's already doable. So all I need now is the ability to have summons drop an item when their summoning ends.

Blizzard

$BlizzABS.drop_event(items, real_x, real_y, dropper = nil, time = nil)


items is an array of database items that will be dropped. real_x and real_y are the screen coordinates times 4. Omit the other values.

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

legacyblade

Do I put that after

  def update_die
    # if summoned
    if $BlizzABS.summoned?(@character)
      # get unsummon ID


if I want the item to drop only if they are unsummoned due to their time running out? (if they're killed, that would mean someone hacked at the flying sword long enough for it to break, and it wouldn't be usable anymore). Or would that make the item dropped no matter how they're unsummoned?

Blizzard

December 07, 2009, 05:10:34 pm #2833 Last Edit: December 07, 2009, 05:15:25 pm by Blizzard
BlizzABS::Processor#remove_summon

    def remove_summon(summon)
     # remove this counter
     @summon_time.delete(summon)
     # make it "die"
     summon.battler.hp = 0
     # delete from events in case an enemy summoned this summon
     $game_map.events.delete(summon)
   end


Just alias the method, check if the summon was not killed yet and then make the item drop.

    alias remove_summon_itemdrop_later remove_summon
   def remove_summon(summon)
     if !summon.battler.dead?
       item_id = case summon.battler.id
       when 1 then 5 # actor 1 is dropped item 5
       end
       pix = self.pixel
       drop_event([$data_items[item_id]], summon.x / pix * 128, summon.y / pix * 128)
     end
     remove_summon_itemdrop_later(summon)
   end


Remember to instantiate BlizzABS::Processor again after adding this edit.

$BlizzABS = BlizzABS::Processor.new


Isn't it awesome how easy it is to add a new feature to Blizz-ABS? :D
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

@.@
STOP GIVING ME IDEASSSSS

:V:

legacyblade

o.o wow that's pretty easy blizz. I always thought making addons for blizzABS was hard, XD

There's an addon I'd like to make for it, but I'm not quite sure of the structure of blizzABS yet. What would I need to do the following

do something every frame (while blizzABS is active)
check if any enemy or actor on the map has a certain state

(I'm trying to make a few of my half scripted half evented systems less clunky by making a blizzABS addon)

Blizzard

December 07, 2009, 05:52:02 pm #2836 Last Edit: December 07, 2009, 05:54:21 pm by Blizzard
Just alias Scene_Map#update for the frame update. When $game_temp.in_battle is true, then you can use Blizz-ABS controls (it's directly connected to the DISABLED BLIZZ-ABS setting).

You can use $game_map.battlers to obtain all map battlers or $game_map.battlers_group(GROUP_ID) to obtain only battlers from a specific Alignment group. $BlizzABS.actors has all actors and $BlizzABS.battlers includes summons as well. So you can just use:

if ($BlizzABS.battlers + $game_map.battlers_group(
   BlizzABS::Alignments::ENEMY_GROUP)).any? {|character|
       character.battler != nil && character.battler.state?(S_ID)}


Or you can use this:

if $game_party.actors.any? {|actor| actor.state?(S_ID)} ||
   $BlizzABS.enemy_has_state?(BlizzABS::TROOP, S_ID)


Making use of battleflow conditions. :3
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

legacyblade

Thanks for that blizz! With the code you provided, I was able to create the addon. I'll release it within the next couple days, once I add instructions and make a demo. Making that a simple plugin saved me literally HOURS of work. Thanks again.

I'm also working on another addon for my game, one that seems a bit more difficult. Since I am modeling a lot of my game off of Zelda,  I decided to mimic the three C button system seen on the N64 and Game Cube (though it was X,Y, and Z on this system). I do this since I'm going to use a single button for skill launching and selection, and so only the items will need to be done via a hotkey. However, I don't want the user to have to reach for the number keys, I want to change which keyboard keys are used to trigger the hotkeys (I,O, and P). How would I go about doing this? And I know it's been asked before, but I couldn't find it. How can you change what skills/items are bound to a hotkey using a script call? (I'll be making my own hotkey menu, that's why I need that last bit)

Blizzard

December 08, 2009, 08:23:14 am #2838 Last Edit: December 08, 2009, 08:24:23 am by Blizzard
actor.item_hotkeys and actor.skill_hotkeys contain arrays of bound IDs. actor.skill and actor.item have the currently assigned button and need to be set so a skill can be used. i.e. when using DIRECT_HOTKEYS I set those variables and then immediately use the skill/item.

EDIT: You could just replace the hotkeys 0-9 with a 3 button hotkey system and use DIRECT_HOTKEYS.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

legacyblade

Thanks a ton Blizz! I really appreciate your help.