CoozieKun's Earthboundish Engine (adept scripters would be appreciated)

WinglessRM

Villager
Member
Joined
Sep 20, 2013
Messages
28
Reaction score
3
Primarily Uses
OK so I've been playing around with CoozieKuns Earthboundish Battle Core for the last couple of days and I've ran into some strange errors that i was hoping someone who understands Ruby quite well could help me out with.

The first issue is with the Sprite positioning.Now Before i added Yanfly Core engine the Sprite was perfectly centered with the Status Box like so.





But after installing the Yanfly script for 640 x 480 resolutions,the Sprite display looks like this.





Now I managed to dig into the Earthbound Sprite Display Script (Which i will attach at the bottom along with the other 2 scripts) and in line *132* theirs the code that says "self . y = 296" In which i edited 296 to 363 and was able to get its positioning on the Y axis pretty close to normal





but i'm at a lost as to how to fix the X axis position because the line (which is 131) also abit complicated and involves other party members.If someone could look at the battle sprite display script and get a feel for how things work and can help me come to a solution i would be very grateful.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Now problem number 2 is abit easier to explain.Basically in the screenshots above i'm using the Earthbound odometer roll (which works beautifully although a bit of tweaking is needed) and all i'm really asking is if it's possible to knock a digit off of it meter,that way it doesn't exceed triple digits.

Line 138 of the odometer scripts deals with the places and it has a code that looks like this " places = [1000, 100, 10, 1]"

I tried knocking the 1000 place off by deleting it but when i do i get this script error.



Something in line 143 goes wonky and i'm not sure what the problem is exactly.Any help on this situation would be appreciated.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The last problem might be alittle tougher and require more RGSS know how but here it goes.

The earthbound battle core scripts is bugged  as it behaves strangely when 2 or more party members attack different mods in a 2 or more monster troop.

For example,If party member A attacks Monster A, Party member B attacks Monster B and Party Member C attacks Monster C,then the battle will freeze once any of the monsters die.

This doesn't happen if everyone gangs up on one monster or only 1 party member is fighting

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If anyone could spare some time to look into my troubles with the scripts i would be very grateful,thank you.Also i will attach all 3 scripts mentioned in this post at the bottom.

 

Cozziekuns - Earthbound Battle Core.rtf

Cozziekuns - Earthbound battle sprite display.rtf

Cozziekuns - Earthbound Odometer Roll.rtf
 

Attachments

orochii

Abomination of life, or life itself.
Veteran
Joined
Apr 29, 2012
Messages
652
Reaction score
364
First Language
Spanish
The line that defines the X says something like this:

self.x = @battler.index * 128 + sx / 2 + 12 + 32 * (4 - $game_party.members.size)Change it to
Code:
self.x = @battler.index * 128 + sx / 2 + 60 + 32 * (4 - $game_party.members.size)
What I did was changing the added 12 to 60. I added 48, because:

640 - 544 = 96 <-this is the difference between resolutions.
96 / 2 = 48 <-and this is the adjustment needed to center it. You center it by knowing the distance between the border and the image center (its middle, so 1/2)

The second part, this is not the best option, but try doing this, search this line:
Code:
od_ary = value.to_s.split("").collect { |str| str.to_i }
Add this line after that one:
Code:
od_ary.delete_at(0)
The last issue seems a little complicated, so I will make a strategic retreat, for now mwahahahahaha,

Orochii Zouveleki lord of Chaos
 

WinglessRM

Villager
Member
Joined
Sep 20, 2013
Messages
28
Reaction score
3
Primarily Uses
The line that defines the X says something like this:

self.x = @battler.index * 128 + sx / 2 + 12 + 32 * (4 - $game_party.members.size)Change it to
Code:
self.x = @battler.index * 128 + sx / 2 + 60 + 32 * (4 - $game_party.members.size)
What I did was changing the added 12 to 60. I added 48, because:640 - 544 = 96 <-this is the difference between resolutions.

96 / 2 = 48 <-and this is the adjustment needed to center it. You center it by knowing the distance between the border and the image center (its middle, so 1/2)

The second part, this is not the best option, but try doing this, search this line:

od_ary = value.to_s.split("").collect { |str| str.to_i }Add this line after that one:
Code:
od_ary.delete_at(0)
The last issue seems a little complicated, so I will make a strategic retreat, for now mwahahahahaha,

Orochii Zouveleki lord of Chaos
HAHA

I place your code where you suggested but i changed at (0) to at (3)

the Line under that i changed from (4 - od_ary.size).times { od_ary.unshift(0) } to (3 - od_ary.size).times { od_ary.unshift(0) }

and removed the 1000 place and now everything works with 3 digits! Thank you very very much Muramusa...i really appreciate your time buddy.

If you come up with any ideas for the battle freeze problem please post them here,i will continue to tinker with the script to get it right.

******EDIT*******

So after playing around with the battle system i realized a few other bugs in the script and they all deal with the odometer.

1: The odometer Keeps rolling after death.When the character loses all hp it will roll until all the damage that would have taken is rolled down.I need to make the script stop rolling at 000 HP reached...If anyone has any tips or ideas to achieve this please post them here.

2:If damage was rolling on the odometer and the battle ends,when a new battle starts,i continues to roll until the damage from the previous fight is rolled down.This obviously needs to be fixed lol.I need damage to stop being taken when a battle ends.Any suggestions would be nice.

3:State damage such as poison don't roll down the odometer they just subtract the HP like regular damage would.

If anyone can poke around in the odometer script and see of they can come up with a fix It would be greatly appreciated!
 
Last edited by a moderator:
Joined
Sep 16, 2013
Messages
30
Reaction score
12
First Language
English
Primarily Uses
I'm not familiar with this script myself so I won't be much help in the coding of it or fixing some of your issues but I can probably help point you in the right direction of at least number 1. (It might be different to what I am saying due to script differences but it's worth a look).

A lot of the time when you don't want something to go below or above a certain number you can fix that through coding a clause that means for example...

if odometer <= 0 odometer == 0endBut not knowing the value that handles the odometer or the script itself very well, I'll leave you to hunt for that. If you can figure out the variable that stores the value to display on the odometer, you can set up that code replacing odometer with that variable within the script area that handles the odometer spinning and it should work if placed correctly and tweaked to fit in with the code.

As I said before, no guarantee not knowing the script but hopefully it'll point you in the right general direction for it.
 

WinglessRM

Villager
Member
Joined
Sep 20, 2013
Messages
28
Reaction score
3
Primarily Uses
I'm not familiar with this script myself so I won't be much help in the coding of it or fixing some of your issues but I can probably help point you in the right direction of at least number 1. (It might be different to what I am saying due to script differences but it's worth a look).

A lot of the time when you don't want something to go below or above a certain number you can fix that through coding a clause that means for example...

if odometer <= 0 odometer == 0endBut not knowing the value that handles the odometer or the script itself very well, I'll leave you to hunt for that. If you can figure out the variable that stores the value to display on the odometer, you can set up that code replacing odometer with that variable within the script area that handles the odometer spinning and it should work if placed correctly and tweaked to fit in with the code.

As I said before, no guarantee not knowing the script but hopefully it'll point you in the right general direction for it.
Thanks for the tip but i really don't know where to put the code to make it a useful test.

***EDIT****

OK so on line 56 and 57 

@odometer_hp = 0

    @odometer_mp = 0

 

I changed these to 

 

@odometer_hp = 000

    @odometer_mp = 000

 

And for w/e reason that made the Odometer stop scrolling at 000 HP making the death state a smooth transition from losing all health.

 

Now...I don't really know how useful this is because the Odometer still rolls up continuously from a Healing spell ( as in it rolls up all health instead of just stopping at max) and it still rolls when you take damage,flee the fight,re-enter another fight....So hopefully this insight will allow anyone willing to help with some information....
 
Last edited by a moderator:
Joined
Sep 16, 2013
Messages
30
Reaction score
12
First Language
English
Primarily Uses
I've had a chance to have a quick glance over the code. The reason it continues to roll into the next battle is because of the lines:

if $game_party.in_battleThis means that the values are changed only during battle and can't really be helped unless you do some major coding changes to alter the values outside of battle to finish the rollovers before entering the next, loading up the already ticked over number at the beginning of battle.

Overall this is a great system but a lot of the code is very messy and hard to decipher without a keen mind. I'll keep looking over it whenever I get some time away from coding my own game and if I can I'll do my best to help you resolve your problems further but I can't promise anything. Hopefully someone else or yourself can beat me to it.

As for the rolling up past the max health for the healing spell, that is handled between lines 73 and 87, if you put on line 48:

class Game_Actor < Game_Battlerin place of:

class Game_Actorthen you'll be able to call on variables inherited from the Game_Battler, this should allow you to call an actors max HP between lines 73 and 87 so that it can max out and not continue to roll over if the player's max health is reached. You should achieve this by tweaking the calculations for value so that it also takes into consideration:

maxhealth - currenthealth = value2if value > value2 value = value2endIf you can work some kind of configuration like that into the code, it'll calculate if the difference between your actor's current health and max health is smaller than your recovery and if the recovery is larger, it'll set the recovery sent to the odometer to the difference between your current health and max health. That should fit somehow between lines 79 and 80 between these 2:

value = value.to_i@result.send("#{stat}_damage=".to_sym, @result.send("#{stat}_damage".to_sym) - value)The reason it'd fit here is the top line changes the value to an integer ready to convert over the odometer and the bottom line sends the result of the value to the odometer and your health is an integer so you want to take the final health value and transfer it over to the number you are going to send before you actually send it.

As always, hope this helps you.
 

orochii

Abomination of life, or life itself.
Veteran
Joined
Apr 29, 2012
Messages
652
Reaction score
364
First Language
Spanish
Thing is, in Earthbound, characters weren't dead until the odometer dropped to zero. So the death bug was instead a missing feature (it would had been changing death condition, to check @odometer_hp instead of @hp). Basically look for all death checks (ex. dead?) and change @hp==0 (or self.hp maybe? I don't remember x'D!) for @odometer_hp==0, that way characters will die only if the odometer fell down to zero.

For the second one, you can do a loop either at start of battle or its end (I would say at the end, I think the method was terminate_battle). You can do two things:

1.Change HP/MP to the number that the odometers say (to simulate Earthbound's way of dealing with this, that is the odometer meaning the damage being dealt slowly):

$game_party.members.each{|actor| actor.hp = actor.odometer_hp;actor.mp = actor.odometer_mp}The other one, change the odometer to the actual HP/MP:

$game_party.members.each{|actor| actor.odometer_hp = actor.hp;actor.odometer_mp = actor.mp}
But anyway, this could or could not work x'D,

Orochii Zouveleki
 

WinglessRM

Villager
Member
Joined
Sep 20, 2013
Messages
28
Reaction score
3
Primarily Uses
I've had a chance to have a quick glance over the code. The reason it continues to roll into the next battle is because of the lines:

if $game_party.in_battleThis means that the values are changed only during battle and can't really be helped unless you do some major coding changes to alter the values outside of battle to finish the rollovers before entering the next, loading up the already ticked over number at the beginning of battle.

Overall this is a great system but a lot of the code is very messy and hard to decipher without a keen mind. I'll keep looking over it whenever I get some time away from coding my own game and if I can I'll do my best to help you resolve your problems further but I can't promise anything. Hopefully someone else or yourself can beat me to it.

As for the rolling up past the max health for the healing spell, that is handled between lines 73 and 87, if you put on line 48:

class Game_Actor < Game_Battlerin place of:

class Game_Actorthen you'll be able to call on variables inherited from the Game_Battler, this should allow you to call an actors max HP between lines 73 and 87 so that it can max out and not continue to roll over if the player's max health is reached. You should achieve this by tweaking the calculations for value so that it also takes into consideration:

maxhealth - currenthealth = value2if value > value2 value = value2endIf you can work some kind of configuration like that into the code, it'll calculate if the difference between your actor's current health and max health is smaller than your recovery and if the recovery is larger, it'll set the recovery sent to the odometer to the difference between your current health and max health. That should fit somehow between lines 79 and 80 between these 2:

value = value.to_i@result.send("#{stat}_damage=".to_sym, @result.send("#{stat}_damage".to_sym) - value)The reason it'd fit here is the top line changes the value to an integer ready to convert over the odometer and the bottom line sends the result of the value to the odometer and your health is an integer so you want to take the final health value and transfer it over to the number you are going to send before you actually send it.

As always, hope this helps you.
WOW this is very insightful.

Thank you for taking to time to look at it as you've brought alot of interesting things to my attention.I'll edit this post with an update in due time.

Thing is, in Earthbound, characters weren't dead until the odometer dropped to zero. So the death bug was instead a missing feature (it would had been changing death condition, to check @odometer_hp instead of @hp). Basically look for all death checks (ex. dead?) and change @hp==0 (or self.hp maybe? I don't remember x'D!) for @odometer_hp==0, that way characters will die only if the odometer fell down to zero.

For the second one, you can do a loop either at start of battle or its end (I would say at the end, I think the method was terminate_battle). You can do two things:

1.Change HP/MP to the number that the odometers say (to simulate Earthbound's way of dealing with this, that is the odometer meaning the damage being dealt slowly):

$game_party.members.each{|actor| actor.hp = actor.odometer_hp;actor.mp = actor.odometer_mp}The other one, change the odometer to the actual HP/MP:

$game_party.members.each{|actor| actor.odometer_hp = actor.hp;actor.odometer_mp = actor.mp}
But anyway, this could or could not work x'D,

Orochii Zouveleki
 

Interesting.

 

I'll try an execute this and give an update on how it went.

 

I really do appreciate both of your assistance in this.

 


*****EDIT*****

 

 

Well i don't think theirs to much more i can do to fix this.After trying to fix the issues i think this is just going out of my expertise with scripting in general.

 

I appreciate those that tried to help though.At the end of the day the code needs to be overhauled and corrected at its foundation and not on just a few lines,so it's a bit more serious than i realized.I just don't have the know how to fix code to that degree.

 

Vamp,what's the name of your game you're working on atm?I would love to play it when it's finished.

 

I'll just let the thread sit here in case anyone has anything else to add or a get an idea from another forum so other people having a problem with the script can see it.
 
Last edited by a moderator:
Joined
Sep 16, 2013
Messages
30
Reaction score
12
First Language
English
Primarily Uses
Sorry I never responded, I spent the last week in hospital, I'll send you a PM in regards to my game Wingless and if I ever get a chance to look over the odometer script properly, you never know... I might be able to rerelease a patched version (with full credits to the original author) for anyone out there who wanted to use it. Definitely something I would consider taking up because the odometer is quite a unique system which not a lot of people have even considered, I think it would certainly be interesting.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,583
Latest member
write2dgray
Top