General RGSS/RGSS2/RGSS3 Help

Started by G_G, March 04, 2009, 12:14:28 am

Previous topic - Next topic

Aqua

Why don't you just test it out yourself...? XD

G_G

Because I dunno...lazyness der xD

Blizzard

Quote from: game_guy on August 22, 2009, 12:57:55 pm
Now is there anyway to dump that weapon into the Weapons.rxdata without erasing all the other weapons?

EDIT: 3
Okay I got it. It dumps the weapon into $data_weapons[id] then it dumps $data_weapons into Weapons.rxdata


Lol, I posted the script snippet in the screenshot thread. Just be sure to have RMXP closed while you are doing this because RMXP will overwrite your file with the file it loaded in the first place if you save it.

Quote from: game_guy on August 22, 2009, 12:57:55 pm
One more question, say I create another .rxdata file and store it in the Data folder. When the game's encrypted will the game be able to still read it?


Yes. You need to use load_data and everything will work fine. load_data is usually loading a file through Marshal serialization, but it can also read such files from the encrypted RGSSAD archive. Blizz-ABS does the same with "MapData.abs" and CP with "MapData.cpx".

I use my own encryption for CP Beta 2. >:3 <3 <3 <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.

shdwlink1993

Quote from: Aqua on August 23, 2009, 12:46:35 am
Not a lot of us know how to RGSS2 though... o.o


When you look at it, RGSS and RGSS2 aren't all that different. Granted, a lot of the RTP Scripts are different, but the core language is the same.

Quote from: Blizzard on August 23, 2009, 04:47:29 am
Yes. You need to use load_data and everything will work fine. load_data is usually loading a file through Marshal serialization, but it can also read such files from the encrypted RGSSAD archive. Blizz-ABS does the same with "MapData.abs" and CP with "MapData.cpx".

I use my own encryption for CP Beta 2. >:3 <3 <3 <3


Well, we all know how you think that Marshal is beneath you, Blizz. xD Regardless, I look forward to breaking said encryption. (Look, when you release CP, I'd love to make a Save File Editor for it. ^_^)
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

winkio

props to the first person to use cheat engine on the final release of CP XD

Blizzard

Quote from: shdwlink1993 on August 24, 2009, 09:03:32 pm
Well, we all know how you think that Marshal is beneath you, Blizz. xD Regardless, I look forward to breaking said encryption. (Look, when you release CP, I'd love to make a Save File Editor for it. ^_^)


Oh no, that's not it. I meant encryption instead of rgssad. This also makes patching the game files so much easier since they aren't all embedded in the rgssad archive and people who upgrade don't need to download 40MB again. :/ The save files will stay DREAM encrypted.

Also, Marshal is a way to serialize data, not an encryption. xD
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.

nathmatt

im trying to turn on a self switch via script but i keep getting an error
im using $game_self_switches[$game_map.map_id, event_id, key] = value
key as in 'A' "B" "C" or "D" value as true or false
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Zeriab

load_data decrypts the relevant portion of the RGSSAD archive before deserializing it. I.e. Marshal deserialization.
It's not like Blizz don't know how to decrypt the encrypted archive though XD

Blizzard

<3

@nathmatt:

$game_self_switches[[$game_map.map_id, event_id, key]] = value
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.

nathmatt

that worked just had to make sure i refreshed the map
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

Yeah, you need to use "$game_map.need_refresh = true" as well.
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.

nathmatt

September 03, 2009, 02:56:45 pm #211 Last Edit: September 03, 2009, 07:07:05 pm by nathmatt
i used $game_map.refesh

edit well actually i was going to use that but just aliased game_map update and made a script very usefull so i could open and close my cell doors without 2 switches per cell see

Spoiler: ShowHide
#-------------------------------------------------------------------------------
#
# Door Opener
#
#-------------------------------------------------------------------------------

class Scene_Map
 
  alias door_update update
  def update
    door_update
    if $door_cheker == true
    case $game_variables[8]
    when 1 then $game_self_switches[[$game_map.map_id, 21, "A"]] = true
    $game_self_switches[[$game_map.map_id, 1, "A"]] = true
    when 2 then $game_self_switches[[$game_map.map_id, 23, "A"]] = true
    $game_self_switches[[$game_map.map_id, 2, "A"]] = true
    when 3 then $game_self_switches[[$game_map.map_id, 24, "A"]] = true
    $game_self_switches[[$game_map.map_id, 3, "A"]] = true
    when 4 then $game_self_switches[[$game_map.map_id, 25, "A"]] = true
    $game_self_switches[[$game_map.map_id, 4, "A"]] = true
    when 5 then $game_self_switches[[$game_map.map_id, 26, "A"]] = true
    $game_self_switches[[$game_map.map_id, 5, "A"]] = true
    when 6 then $game_self_switches[[$game_map.map_id, 27, "A"]] = true
    $game_self_switches[[$game_map.map_id, 6, "A"]] = true
    when 7 then $game_self_switches[[$game_map.map_id, 28, "A"]] = true
    $game_self_switches[[$game_map.map_id, 7, "A"]] = true
    when 8 then $game_self_switches[[$game_map.map_id, 29, "A"]] = true
    $game_self_switches[[$game_map.map_id, 8, "A"]] = true
    when 9 then $game_self_switches[[$game_map.map_id, 30, "A"]] = true
    $game_self_switches[[$game_map.map_id, 9, "A"]] = true
    when 10 then $game_self_switches[[$game_map.map_id, 31, "A"]] = true
    $game_self_switches[[$game_map.map_id, 10, "A"]] = true
    when 11 then $game_self_switches[[$game_map.map_id, 32, "A"]] = true
    $game_self_switches[[$game_map.map_id, 11, "A"]] = true
    when 12 then $game_self_switches[[$game_map.map_id, 33, "A"]] = true
    $game_self_switches[[$game_map.map_id, 12, "A"]] = true
   end
  $door_cheker = false
  end
  if $door_closer == true
    case $game_variables[8]
    when 1 then $game_self_switches[[$game_map.map_id, 21, "A"]] = false
    $game_self_switches[[$game_map.map_id, 1, "C"]] = true
    when 2 then $game_self_switches[[$game_map.map_id, 23, "A"]] = false
    $game_self_switches[[$game_map.map_id, 2, "C"]] = true
    when 3 then $game_self_switches[[$game_map.map_id, 24, "A"]] = false
    $game_self_switches[[$game_map.map_id, 3, "C"]] = true
    when 4 then $game_self_switches[[$game_map.map_id, 25, "A"]] = false
    $game_self_switches[[$game_map.map_id, 4, "C"]] = true
    when 5 then $game_self_switches[[$game_map.map_id, 26, "A"]] = false
    $game_self_switches[[$game_map.map_id, 5, "C"]] = true
    when 6 then $game_self_switches[[$game_map.map_id, 27, "A"]] = false
    $game_self_switches[[$game_map.map_id, 6, "C"]] = true
    when 7 then $game_self_switches[[$game_map.map_id, 28, "A"]] = false
    $game_self_switches[[$game_map.map_id, 7, "C"]] = true
    when 8 then $game_self_switches[[$game_map.map_id, 29, "A"]] = false
    $game_self_switches[[$game_map.map_id, 8, "C"]] = true
    when 9 then $game_self_switches[[$game_map.map_id, 30, "A"]] = false
    $game_self_switches[[$game_map.map_id, 9, "C"]] = true
    when 10 then $game_self_switches[[$game_map.map_id, 31, "A"]] = false
    $game_self_switches[[$game_map.map_id, 10, "C"]] = true
    when 11 then $game_self_switches[[$game_map.map_id, 32, "A"]] = false
    $game_self_switches[[$game_map.map_id, 11, "C"]] = true
    when 12 then $game_self_switches[[$game_map.map_id, 33, "A"]] = false
    $game_self_switches[[$game_map.map_id, 12, "C"]] = true
    end
  $door_closer = false
   end
  end
end


then had my event run the open door animation when "A" was on then turn b on so the door would stay open then when "C" was on it would show the door close and turn "D" on with would torn off the switches that i had not turned off yet
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

My thing just queues this call at an appropriate time. It shouldn't cause problems either way.
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.

Satoh

September 06, 2009, 03:56:22 pm #213 Last Edit: September 06, 2009, 04:13:22 pm by Satoh
I'm attempting to write a custom 'break damage/level/stat barrier' script. I think the caps are set in Game_Battler1, correct? I'm not sure if these are the enemy or actor values... Are actors stored separately?

Though it's mainly an aesthetic thing, I want level values up to 255, HP up to 99999, and stats up to 9999...

I'm not sure whether I need to change the setups in Game_Actor or Game_Battler1... GB1 has an HP value up to 999999, so I'm assuming that's the enemy setup. The GA setup seems to be setup differently though... and I'm not sure how to go about changing this...



Also, as I mentioned in another thread, I want to know how to interface weapons with status effects... or scripts... I want weapons/equipment to change the actor's state permanently, on equip and on unequip...

EDIT: Ok I changed the setups in those  two places but it doesn't seem to work...
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Blizzard

RMXP'S default database settings don't allow to have more than the defaults. But if you change the scripts, you can have more stats ingame. It might be easier to simply go with an already existing script.
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

Okay so I'm making a neat oblivion like saving script. So what I'm doing is make one file hold all save files. That way this file can keep track of how many saves have been done. Now the save slots is an array and I can have a multi array. So its like this.

@save_slots = []

and when I go to save a game it'll dump all the important data into another array then dump that array into another array which will be in the save slots array. Is that possible? or will it cause errors or is it just a plain bad idea.
@vars = [$game_system, $game_actors, ect.]
@temp = ["Save #{$ggloadsave.saves}, @vars]
@save_slots.push(@temp)

That'd be right right?

Then I'd access the variables using this I think
@temp2 = $ggloadsave.saveslots[index]
$game_system = @temp2[1][0]


I think anyways can someone help me out here?

Blizzard

High chance of inconsistent data. Don't do it.
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.

Ryex

would a hash be better for this? that way you could save the data like so

@vars = {}
@vars['Game_System'] = $game_system
@vars['Game_Actors'] = $game_actors
ect.
@save_slots['slot_id'] = @vars
save_data(@save_slots, 'path.rxdata)



and retrieve like

@save_slots = load_data('path.rxdata')
$game_system = @save_slots['slot_id']['Game_System']
$game_actors = @save_slots['slot_id']['Game_Actors']
ect.


that way there is no messing around with indexes, no inconsistent data. right blizz?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

fugibo

Quote from: Ryexander on September 07, 2009, 06:39:10 pm
would a hash be better for this? that way you could save the data like so

@vars = {}
@vars['Game_System'] = $game_system
@vars['Game_Actors'] = $game_actors
ect.
@save_slots['slot_id'] = @vars
save_data(@save_slots, 'path.rxdata)



and retrieve like

@save_slots = load_data('path.rxdata')
$game_system = @save_slots['slot_id']['Game_System']
$game_actors = @save_slots['slot_id']['Game_Actors']
ect.


that way there is no messing around with indexes, no inconsistent data. right blizz?


Epic waste of space. Instead of one file for all saves, why not use an index file for the saves? You could make a simple class for it and marshall it into SaveIndex.rxdata.

Ryex

even better! that way is saves the path to all the save files in the saveindex.rxdata!
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />