[XP] Tons of Add-ons

Started by Blizzard, January 09, 2008, 08:50:47 am

Previous topic - Next topic

SolarisSpell

Thanks for the help.

 def check_events
    events, names = [$game_player], [nil]
This solved the problem of some transfer events being show as a square, but one as an arrow.
Now it always differentiates some events as arrows and some as squares. I've come to the conclusion that it depends if the events can face different directions (for example, the end of the map is a transfer event with nothing more, so it's a square, but a door is an arrow). I'm still trying to make it so that it is always a square.

The problem with the player arrow disappearing in some maps was fixed just increasing sprite.z


It's strange, but this script is giving a lot of problems, and I'm even thinking that maybe something in my project is affecting it.
For example, all the customizations options seems to not have any effect:
PLAYER_COLOR = Color.new(0, 255, 0)
EVENT_COLOR = Color.new(0, 128, 255)
TELEPORT_COLOR = Color.new(255, 255, 0)
SPECIAL_COLOR = Color.new(255, 0, 0)
MINIMAP_X = 0
MINIMAP_Y = 0
MINIMAP_WIDTH = 160
MINIMAP_HEIGHT = 160
MINIMAP_OPACITY = 160
MAP_MOVE_BUTTON = Input::Z
If I change these vales, nothing happen. I even tried using script calls as it says in the instructions with no result.

If I add \spc as a comment in an event, nothing happens, but if I add it in its name, it is shown. Right now, I can only see the player arrow, transfer events and these \spc in name events. I don't know if it should work any different (as I'd like to show with different colors events if they are enemies, npc, treasures, etc)

I'll try messing around with the code, but it seems the script is just not being fully compatible with my game

KK20

Quote from: SolarisSpell on June 01, 2021, 04:52:07 pmIf I change these vales, nothing happen. I even tried using script calls as it says in the instructions with no result.
-squints-
-CTRL + F's the script-

...Blizzard what the fuck. How did no one ever report this?

Quote from: SolarisSpell on June 01, 2021, 04:52:07 pmI've come to the conclusion that it depends if the events can face different directions (for example, the end of the map is a transfer event with nothing more, so it's a square, but a door is an arrow).
Yes, that is how it works.

Quote from: SolarisSpell on June 01, 2021, 04:52:07 pmI'm still trying to make it so that it is always a square.
You put \box in the event name. You should have been able to infer that from my previous post, though I will admit it's not documented anywhere.

Quote from: SolarisSpell on June 01, 2021, 04:52:07 pmRight now, I can only see the player arrow, transfer events and these \spc in name events. I don't know if it should work any different
No, that's all it does. They will all be marked the same color.

Quote from: SolarisSpell on June 01, 2021, 04:52:07 pm(as I'd like to show with different colors events if they are enemies, npc, treasures, etc)
Again, that is a script request.

Quote from: SolarisSpell on June 01, 2021, 04:52:07 pmbut it seems the script is just not being fully compatible with my game
...or do you mean "doesn't fulfill your needs"?
Incompatible would mean it doesn't work with another script.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

SolarisSpell

June 02, 2021, 05:16:44 pm #982 Last Edit: June 02, 2021, 05:19:14 pm by SolarisSpell
Quote...or do you mean "doesn't fulfill your needs"?
Incompatible would mean it doesn't work with another script.

Sorry, I didn't mean to be pretentious. I just was sure something had to be wrong with my game, as I tried following the instructions and some things weren't responding, so I thought some other script were messing the code. (And when restarting the game with F12, the minimap changed. It was there, but blocky instead of drawing diagonals).


QuoteYou put \box in the event name. You should have been able to infer that from my previous post, though I will admit it's not documented anywhere.

It's so simple... argh. I did try it, but I only created an event with \box in it's name with no result. I didn't try to create a '\spc \box' or add it to the transfer event... I've done it now and have seen that it works perfectly.


Thanks again. It works and it was just me not knowing how to implement it in the game.


Thommy

July 07, 2021, 10:02:36 am #983 Last Edit: July 07, 2021, 10:31:35 am by Thommy
Hello

I have an odd error when i display the MiniMap with F5.

The map shows everything except the green arrow for the player, but strangely it shows the arrows of the followers.
Any tip for me?

EDIT: i found out that if i've no Transfer scripts with the 'Player touch' Tag, the players arrow is shown. But when i activate the Event the arrow is Not shown. Also, when i have the caterpillar activated and for example two Transfer Events, than only two follower arrows are being shown.

What the hell did i Do wrong? xD

KK20

Replace the relevant minimap methods with these
  def check_events
    events, names = [$game_player], [nil]
    if $game_system.CATERPILLAR
      $game_player.members.each {|event|
        if event.character_name != ''
          events.push(event)
          names.push(event.character_name)
        end
      }
    end
    $game_map.events.each_value {|event|
        next if event.name.clone.gsub!('\nomap') {''}
        if event.is_a?(Game_Event) && !event.erased && (event.teleport ||
            event.name.clone.gsub!('\spc') {''})
          events.push(event)
          names.push(event.character_name)
        end}
    return events, names
  end
 
  def create_sevents
    @sevents = []
    @events.each_index {|i|
        sprite = Sprite.new(viewport)
        rect = Rect.new(0, 0, 56, 14)
        if @events[i] == $game_player
          if @names[i] != ''
            sprite.bitmap = Bitmap.new(56, 14)
            sprite.bitmap.blt(0, 0, $tons_cache.get_image('green_arrow'), rect, 128)
          end
          sprite.z = 100
        elsif @events[i].is_a?(Game_Member)
          if @names[i] != ''
            sprite.bitmap = Bitmap.new(56, 14)
            sprite.bitmap.blt(0, 0, $tons_cache.get_image('blue_arrow'), rect, 128)
          end
          sprite.z = 80
        elsif @events[i].is_a?(Game_Event)
          if @events[i].name.clone.gsub!('\spc') {''}
            color, arrow, sprite.z = Color.new(255, 255, 0, 128), 'yellow_arrow', 60
          elsif @events[i].teleport
            color, arrow, sprite.z = Color.new(128, 0, 255, 128), 'violet_arrow', 40
          end
          if @names[i] == '' || @events[i].name.clone.gsub!('\box') {''}
            sprite.bitmap = Bitmap.new(8, 8)
            sprite.bitmap.fill_rect(0, 0, 8, 8, Color.new(0, 0, 0, 128))
            sprite.bitmap.fill_rect(1, 1, 6, 6, color)
          else
            sprite.bitmap = Bitmap.new(56, 14)
            sprite.bitmap.blt(0, 0, $tons_cache.get_image(arrow), rect, 128)
          end
        elsif @names[i] == '' || @events[i].name.clone.gsub!('\box') {''}
          sprite.bitmap = Bitmap.new(8, 8)
          sprite.bitmap.fill_rect(0, 0, 8, 8, Color.new(0, 0, 0, 128))
          sprite.bitmap.fill_rect(1, 1, 6, 6, Color.new(255, 255, 255, 128))
        else
          sprite.bitmap = Bitmap.new(56, 14)
          sprite.bitmap.blt(0, 0, $tons_cache.get_image('white_arrow'), Rect.new(0, 0, 56, 14), 128)
        end
        sprite.bitmap = Bitmap.new(1, 1) if sprite.bitmap == nil
        sprite.ox = sprite.oy = 64
        if sprite.bitmap.width != 8
          sprite.src_rect.set((@events[i].direction-2)*7, 0, 14, 14)
        end
        @sevents.push(sprite)}
  end
These are clearly bugs, so hopefully Blizz sees this and updates accordingly.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Thommy


Blizzard

Uploaded a new version with KK20's fix.
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.

Thommy

Yay it's me again! xD

Some issue with the minimap again.

When i Look At the the whole minimap by pressing F5 two Times the Green arrow for the Player freezes and doesn't move anymore.

Any fix for that?

KK20

Quote from: KK20 on June 01, 2021, 01:51:22 amAs for the map being moved to the middle of the screen, I don't know if not updating the events in real-time is a bug or intended. When you hold down the Z button and move with the arrow keys on larger maps, it is supposed to scroll the minimap.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Thommy

Oh no it's thommy again xD
I habe a Problem with the location namens.

I put in a Script for a custom title screen from this

https://www.neoseeker.com/forums/22121/t667163-ssbms-custom-title-screen/

Website and now i get an error everytime i enter a map where the Name should be shown. I already Figuren out that it Has to Do something with the

$scene = Scene_Title.new line in Main wich isn't included anymore after i replaced it with the script.

Any idea to help an Idiot in Scripting? xD

KK20

Either use a different method/script for making a map a title screen, or post what the error is.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Thommy

Oh sorry i forgot.

When i enter a map where the Name is supposes to Show i get those:

Script 'Blizzard -> 1' line 1684: NoMethodError occured.

Undefined method '[]' for nil:NilClass

I hope this helps

KK20

August 13, 2021, 11:44:15 am #992 Last Edit: August 13, 2021, 11:49:52 am by KK20
The variable responsible for storing the map names was never initialized. That's handled when Scene_Title is called, but since you're skipping that, it never calls it.

You need to add this somewhere before your game starts, like in Main
$map_names = load_data('Data/MapInfos.rxdata')
$map_names.each_key {|key| $map_names[key] = $map_names[key].name}

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Thommy

That fixed it. Thank you very much =)