Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - KK20

1
RMXP Script Database / Re: [XP] Tons of Add-ons
July 25, 2021, 12:22:02 pm
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.
2
When you mean by standalone, do you mean you're running on XP/RGSS1 engine? or XPA with most of the extra scripts I added removed?

It seems like a simple Z layer issue to me.
3
Welcome! / Re: Hi!
July 09, 2021, 03:46:57 am
Happy Birthday :P

I assume you're chikcne on the mkxp discord server?
4
Yeah, one of the devs came into the CP discord asking for some script help. Turns out it was an issue with their mkxp, not RGSS, and down the rabbit hole I went to see that the logic they wrote was completely wrong, pointed it out and how to do it, they refused to listen, told me I was wrong, and whined how they're "not good at C++". Come a week later and I see a commit where they did exactly what I told them to do and I never got a thanks or sorry in return. Like, it was literally faulty logic order...had nothing to do with language knowledge. And to think this person claimed to be a programmer/software engineer baffles me.

They left the server, then came back again asking for help, and specifically said they wanted help from someone other than me because I apparently was "too hard on them" or some shitty reason. Jokes on them though, I'm like the only active person on CP who even provides script help these days. Anyways, ended up one of my friends answering their question (although very generically), and they left without saying a word, so he also agreed with me that they were a prick. Needless to say, they are banned.
5
I'd suggest using a script instead then. IDK what you mean by their custom game EXE allows you to wrap the map when you can do that already with vanilla XP. Unless you mean it's like...easier to enable it, such as a toggle, which the other RM engine editors do.

Also, I'm extremely bitter towards the people who work on that fork of mkxp. They get 0 respect from me.
Oh wait, that's the original oneshot fork. I thought you meant the other oneshot fork that's still getting updated.
6
You sure it's only happening in XPA? There's no such thing as Game_Map#id to begin with. It might be a typo and is supposed to be map_id.

EDIT: Yeah, I'm pretty sure it's a typo. The reason you don't see the error in vanilla XP is because, in Ruby 1.8, #id is synonymous with #object_id and #__id__, which is like the memory address ID.

From what I can see, there are four instances of this
$game_map.id
, so CTRL + H and replace them all with
$game_map.map_id
7
RMXP Script Database / Re: [XP] Tons of Add-ons
July 08, 2021, 01:56:37 am
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.
8
Are you using some kind of script for map loop/wrap? You'd think they would have implemented it already.
9
RMXP Script Database / Re: [XP] Lagless Path Finder
July 05, 2021, 10:56:27 pm
Yeah, it has to do with the PASSABLE parameter in the script call. You should be setting that to true in these cases.
PathFinder.find(0, [19, 13], 0, true)
I feel like true should have been the default, or at the very least be the default if the range is 0.
  def self.check_args(char, target, range, pass, dynamic, immediate)
    range = 0 if range == nil || range < 0
    pass = true if range == 0
10
RMXP Script Database / Re: [XP] Lagless Path Finder
July 05, 2021, 03:11:25 pm
If you could provide a visible example, I'd take a look at it.
11
winkio returns briefly from retirement :o

*fixes topic header so it can be added to the database*

EDIT: yo wut, the scripts disappeared after my edit. Good thing I still had a tab open to the original post.
12
RMXP Script Database / Re: [XP] Tons of Add-ons
June 02, 2021, 03:29:39 am
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.
13
RMXP Script Database / Re: [XP] Tons of Add-ons
June 01, 2021, 01:51:22 am
Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmThe script auto-detects my 'transfer events' and creates a purple square in the minimap. But sometimes, it instead creates a purple arrow and I don't know how to make sure it always creates a square. If I have more than one transfer event one after another, it sometimes shows the majority as purple squares, and one as a purple arrow.
This is a bug. Locate the following in the script and make sure it looks like this:
  def check_events
    events, names = [$game_player], [nil]

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmCan you choose to not auto-detect so I can specify when/where to show in the minimap?
I don't know what you mean by this question. If you don't want an event to show up on the minimap, you just put \nomap in its name.

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmAnd can you make that this purple squares are borderless?
This is how the square is being made:
          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)
The border is made by the first fill_rect call, the second creates the colored square. Thus the obvious solution is to do this:
          if @names[i] == '' || @events[i].name.clone.gsub!('\box') {''}
            sprite.bitmap = Bitmap.new(8, 8)
            sprite.bitmap.fill_rect(0, 0, 8, 8, color)
Just know that this will affect all events that are to be drawn as a box, not just teleport spots. Maybe you can do this instead:
          if @events[i].teleport
            sprite.bitmap = Bitmap.new(8, 8)
            sprite.bitmap.fill_rect(0, 0, 8, 8, color)
          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)
          else
            sprite.bitmap = Bitmap.new(56, 14)
            sprite.bitmap.blt(0, 0, $tons_cache.get_image(arrow), rect, 128)
          end

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmAlso, maybe it's completely my fault, but I don't know how to create different kind of minimap events like, show enemies like this, npcs like that, treasures in a different way, etc...
#   Any event with and comment with "\spc" in their code will be also
#   displayed differently.
With the default configuration, it shows the event as a yellow arrow.

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmIt would be great if it were possible to use images for this little events, as I already have some nice ones.
That's more suited for a script request. This script creates its own graphics for the minimap entirely in RGSS.

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmIt's probably not important, but I don't know what Game_Member is. I think it breaks my game, so I'm just removing it.
It's part of the caterpillar script, which is in Part 1 of Tons. IDK how you're saying it's breaking your game unless you don't have Part 1 in your game. Tons requires all 3 parts to ensure nothing breaks. Granted, if you know what you're doing, then removing the offending line isn't a big deal.

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmAnd finally, player arrow is somehow erratic. Sometimes it works, sometimes it isn't shown. But when it does work, if you change to the large version of the minimap (pressing F5 again), the green arrow just doesn't move, even if you do.
Don't know how to reproduce the arrow not being shown.
As 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.
14
That's actually really common. It's not doing anything malicious if you're worried. Most antivirus use telemetry data to guess how safe a file is if its internal or cloud definitions can't detect anything. This is called "reputation", meaning popular files will naturally have high positive values. Since you're essentially creating a new EXE that no antivirus has seen before, its reputation will be low and be marked as potentially suspicious or given some generic reputation-based detection name.

If you want to avoid this, you'll need to look into digitally signing your EXE and going to all the antivirus vendors to request proactive whitelisting.

I'd like to add that using Enigma isn't really recommended for commercial distribution. It's more of a convenience factor or "neat discovery" made. For one, it assumes the game is being launched from the C drive, otherwise the game won't launch. And I think someone has found a way to get the packaged files, so coming up with your own encryption method is the better way to go.
15
Already answered in a PM, but posting here for others.

XPA comes equipped with a traceback script for better debugging (see Main). The pop-up window that typically happens when an error occurs can only fit so much text in it. If your traceback is too large, as a result, it outputs the error to an external LOG file in your game project's folder.
16
Heads up, your second link didn't work.

SDK stands for standard development kit. It was a collaborative effort of many XP scripters to essentially rewrite the base XP scripts since XP wasn't exactly written with the best design principles in mind. The idea was to break up lengthy methods and modularize it, with the intent to make extending the base scripts easier for future user scripts. Basically, it tried to make XP look more like what VXA does.

Unfortunately, this caused a divide in the community since certain scripts now depended on SDK in order to function properly. Meanwhile, other scripters assumed no SDK was being used when writing their scripts, but now it's most likely incompatible when SDK is introduced. The idea had good intentions, but since it was never standardized, it ended up being a mistake. Not to mention, not all of the scripters who worked on the SDK were particularly good at programming either, so there's some poorly written/hackish solutions still lurking in it. We here at CP frown upon its usage as a result.

Anyways, the issue is the fact that Object#instance_variables has changed between Ruby versions 1.8 and 1.9; the former returned Strings while the latter returns Symbols. The solution is to convert the Symbols to Strings using to_s. Find and replace in Scene_Base:
  #--------------------------------------------------------------------------
  # * Main Processing : Disposal
  #--------------------------------------------------------------------------
  def main_dispose
    # Passes Through All Instance Variables
    self.instance_variables.each do |object_name|
      # Evaluates Object
      object = eval object_name.to_s
      # Pass Object To Auto Dispose
      auto_dispose(object)
    end
  end
  #--------------------------------------------------------------------------
  # * Main Processing : Ending
  #--------------------------------------------------------------------------
  def main_end; end
  #--------------------------------------------------------------------------
  # * Main Processing : Update
  #--------------------------------------------------------------------------
  def main_update
    # Passes Through All Instance Variables
    self.instance_variables.each do |object_name|
      # Evaluates Object
      object = eval object_name.to_s
      # Pass Object To Auto Update
      auto_update(object)
    end
  end
17
It depends on what kind of game you're trying to make. If it was really simple, you could just have 2 stats: HP and ATK. You don't have to use everything that's available--only take what you need.
18
Welcome! / Re: Presentation
April 21, 2021, 12:45:27 am
Hello :hi:

Not many people around to "exchange" with, just a forewarning. A few of us do hang out in Discord though.
19
Resources / Re: Sound effects
April 09, 2021, 10:56:09 pm
Tried making an account using a secondary email, but still haven't received anything from them yet. Will update later.

Edit: Still no email received...
20
It's another one of the help file's mistakes. You can easily confirm this by trying
p RPG::BattleEventPage
and get
uninitialized constant RPG::BattleEventPage

If you then try to do
p RPG::Troop.new
You'll see
@pages=[#<RPG::Troop::Page ... >]

The text in the RPG::Troop documentation in the help file is correct.
Quotepages
  Battle events. An RPG::Troop::Page array.

Though I never really realized this until just now and saw that XPA has this incorrect class definition in its scripts.