Survival System by Apellonyx Problem

kaarnij

Villager
Member
Joined
Aug 30, 2015
Messages
21
Reaction score
0
First Language
English
Primarily Uses
Hi, I'm trying to make a basic kid game for my first project, I'm new with all of this but sure i followed the right steps, my problem is


I've tried to setup the Survival System by Apellonyx and completed all these steps below but i get this error


I only want to use rest, hunger and thirst and I've disable the others and if 1 of the bars goes down it simply transfers the player to a different location like a hospital instead of the game over which i havent figured out yet because im stuck with this error


Error on line 576


survival system help RPG MAKER 4.jpg


Here's the instructions i follow=


1. In "Database", create a "Common Events" called "Apple effect" (or something else you want).


2. In the "content" of this event, open up the "Event Commands" (double clicking a line) and go to the 3rd tab.


3. Under "Advanced", click on "Script".


4. Copy and paste "$survival_v[2] += n" (eg: n = 20) into the textbox. This means that whenever this function is called, it will add 20 to the value of the food bar.


5. Now go to "Items" and create an "Apple" item (change maximum to add a new item).


6. Set the price, description etc to your liking.


7. In the right side of the menu, under "Effects", double click on a space.


8. Under "Other" tab, click on "Common Event" and select the "Apple effect" you just created in the previous steps.


9. Read the script's "SURVIVALSWITCH  = 1 # Game switch ID for enabling and disabling the system"; it is a direct copy of the script. You can change this number but make sure you change it for step 12.


10. In an empty square of the map, "Activate" the system.


11. In the 1st tab under "Game Progression", click on "Control Switches".


12. Choose the "0001" switch, that corresponds with step 9. I named mine "Survival System". The whole line is "Control Switches: [0001: Survival System] = ON


13. In the main event page at the bottom, under "Trigger", set it to "Parallel Process".


Heres the script


<snip>


View attachment 24302


View attachment 24301


View attachment 24300


Link to the Survival system


http://www.rpgmakervxace.net/topic/14084-survival-system/


Any help would be much appreciated thx

View attachment 24300

View attachment 24301

View attachment 24302

survival system help RPG MAKER 4.jpg
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,402
Reaction score
12,939
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support (Scripts is where you share scripts you have written). Please be sure to post your threads in the correct forum next time. Thank you.


Please do not paste other people's scripts into your post, unless they are not available online or you have made significant mods to it. A link is all we need (and is actually better, if it's a link to the forum thread or blog article where the script is introduced, as they have extra stuff that's not included in the script, that is helpful when troubleshooting).


The error is saying it can't find a method named draw_current_and_max_values in the Window_Survival class. This inherits from Window_Base, which does have that method. So I'm wondering if you've actually modified Window_Base and have somehow removed or renamed that method?


If you disable that whole script (click somewhere in the script itself, Control-A to select all, then Control-Q to comment it out), do you get the same/similar error when you open the menu and view the actor status screen?


Any chance you made it no longer inherit from Window_Base as part of your edits?
 
Last edited by a moderator:

kaarnij

Villager
Member
Joined
Aug 30, 2015
Messages
21
Reaction score
0
First Language
English
Primarily Uses
Thank you, i must of changed something in the Window_base script when i was trying to remove Skills, Equipment, status, basic stats and formation. I replaced the script with the default and is now is working. tyvm Shaz, much appreciated!!!  :D
 

kaarnij

Villager
Member
Joined
Aug 30, 2015
Messages
21
Reaction score
0
First Language
English
Primarily Uses
Hey Shaz, if u could maybe help me again it would be great! Now I'm getting a new error and must have something to do with the event i made that turns the script on, i think i may of made the event wrong and everything works well until i try to eat or drink the items i made for this script

Heres the error and event i made to turn on the script

survival system help RPG MAKER 5.jpg

 

and other pics of what I've done to get this script working

survival system help RPG MAKER 3.jpg

survival system help RPG MAKER 2.jpg

survival system help RPG MAKER 1.jpg

survival system help RPG MAKER 5.jpg
 

kaarnij

Villager
Member
Joined
Aug 30, 2015
Messages
21
Reaction score
0
First Language
English
Primarily Uses
nvm my last post I've got it working now, but what I would like to do now is instead of dying when you run out of food and drink i want it to teleport or transfer the player to a new location, any help would much be appreciated :)

I found the bit of code that need changing on lines 317 to 324

      if $survival_v[1] <= 0

        SceneManager.call(Scene_Gameover) if DEATHATZERO

      end # if $survival_v[1] <= 0

      if $survival_v[5] >= TOXINMAX

        SceneManager.call(Scene_Gameover) if DEATHFULLTOXIN

      end # if $survival_v[5] >= TOXINMAX

    end # if $game_switches[sURVIVALSWITCH] == true

  end # def update
 
Last edited by a moderator:

Sinweaver

Veteran
Veteran
Joined
Aug 11, 2015
Messages
599
Reaction score
418
First Language
English
Primarily Uses
This should solve your problem

if $survival_v[1] <= 0 $game_player.reserve_transfer(map_id, x, y, direction) $survival_v[1] = 1 end # if $survival_v[1] <= 0 if $survival_v[5] >= TOXINMAX $game_player.reserve_transfer(map_id, x, y, direction) $survival_v[5] = 0 end # if $survival_v[5] >= TOXINMAX end # if $game_switches[SURVIVALSWITCH] == true end # def updateI replaced this, which caused the game over screen

SceneManager.call(Scene_Gameover) if DEATHATZEROwith 

$game_player.reserve_transfer(map_id, x, y, direction)I also added extra line to make sure that you don't get stuck by the transfer event because your Life is at 0 points or your toxin is not at 0. In other words, your toxin level will be reseted and your life point will be set to 1

$survival_v[1] = 1
Code:
$survival_v[5] = 0 
The things that you will have to configure are:

  • replace map_id with the map id for your hospital map
  • replace x with the x coordinate for the player to show up
  • replace y with the y coordinate for the player to show up
  • replace direction with 0, 2, 4, 6, or 8. 0 = no directional change, 2 = face down, 4 = face left, 6 = face right, 8 = face up
 
Last edited by a moderator:

kaarnij

Villager
Member
Joined
Aug 30, 2015
Messages
21
Reaction score
0
First Language
English
Primarily Uses
thanks your a legend in the making :D

i had almost figured it out myself but was gonna try something more ugly, this is much better!  Im not using Life or toxin, i turned that code off, I'm only using food, water and rest as i'm making a educational kids game... so ill change [1] and [5] to 2,3,4 and replace that code.... thx agn

Stupid question but I've done something wrong

        $game_temp.fade_type = fade 

        $game_player.reserve_transfer(map_Hospital_W5, 001, 009, down)             < the map name is just Hospital_W5, im not sure if this is right?

        $survival_v[2] += 66                                      

      end # if $survival_v[1] <= 0

      if $survival_v[3] >= TOXINMAX

        $game_temp.fade_type = fade

        $game_player.reserve_transfer(map_Hospital_W5, 001, 009, down)

        $survival_v[3] += 66

      if $survival_v[4] >= TOXINMAX

        $game_temp.fade_type = fade

        $game_player.reserve_transfer(map_Hospital_W5, 001, 009, down)

        $survival_v[4] += 66

      end # if $survival_v[5] >= TOXINMAX

    end # if $game_switches[sURVIVALSWITCH] == true

  end # def update
 
Last edited by a moderator:

Sinweaver

Veteran
Veteran
Joined
Aug 11, 2015
Messages
599
Reaction score
418
First Language
English
Primarily Uses
Good thing you almost figured it out lol

I just realized I made a mistake one the 2nd part while copy and pasting for the toxin part. Shouldn't really matter if you only copied the part for Life.

$survival_v[5] = 0 I wrote that as this in my original post... fml

Code:
$survival_v[1] = 0
 

kaarnij

Villager
Member
Joined
Aug 30, 2015
Messages
21
Reaction score
0
First Language
English
Primarily Uses
well since im not using life or toxin Im just gonna make them go back up +=100 so food, water and rest go back to hundred

and if my map is called Hospital_W5 would i put the code as this 

$game_player.reserve_transfer(map_Hospital_W5, 001, 009, down)

stupid question i know but its my first time lol
 
Last edited by a moderator:

Sinweaver

Veteran
Veteran
Joined
Aug 11, 2015
Messages
599
Reaction score
418
First Language
English
Primarily Uses
No. No such thing as stupid question unless you are trolling, which you are not =p

$game_player.reserve_transfer(map_Hospital_W5, 001, 009, down)A few things to point out:

  1. map_Hospital_W5 is not a map ID.
  2. Remove the 00 from your coordinates value
  3. Replace "down" with a number corresponding to the direction you want your character to face. 0 = no change, 2 = down, 4 = left, 6 = right, 8 = up
Right click the hospital map and click on map properties.

A new window should pop up and the title of the window should be something like Map Properties - ID002 or something like that (depending on the map's ID)

Use that number without the 0. So if my hospital map's property window title is "Map Properties - ID002", I want to transfer the player to coordinates (1,9) and I want player to face down, my code should look like 

Code:
$game_player.reserve_transfer(2, 1, 9, 2)
 
Last edited by a moderator:

kaarnij

Villager
Member
Joined
Aug 30, 2015
Messages
21
Reaction score
0
First Language
English
Primarily Uses
oooh that makes sense, well i gave it ago...

this is what i have 

  if $survival_v[2] <= 0

        $game_temp.fade_type = fade 

        $game_player.reserve_transfer(19, 1, 9, 2)

        $survival_v[2] += 100                                     

      end # if $survival_v[1] <= 0

      if $survival_v[3] >= TOXINMAX

        $game_temp.fade_type = fade

        $game_player.reserve_transfer(19, 1, 9, 2)

        $survival_v[3] += 100

      if $survival_v[4] >= TOXINMAX

        $game_temp.fade_type = fade

        $game_player.reserve_transfer(19, 1, 9, 2)

        $survival_v[4] += 100

      end # if $survival_v[5] >= TOXINMAX

    end # if $game_switches[sURVIVALSWITCH] == true

  end # def update

 

but i get a new error now

survival system help RPG MAKER 6.jpg

 

http://www.rpgmakervxace.net/topic/14084-survival-system/
 
Last edited by a moderator:

Sinweaver

Veteran
Veteran
Joined
Aug 11, 2015
Messages
599
Reaction score
418
First Language
English
Primarily Uses
I dont know where line 681 is for your code, but another mistake is the use of the word fade.

You have to use either 0 for black, 1 for white, or 2 for none

$game_temp.fade_type = fadeShould be written as 

Code:
$game_temp.fade_type = 1     #or 0, or 2 for whichever effect you desire
 

kaarnij

Villager
Member
Joined
Aug 30, 2015
Messages
21
Reaction score
0
First Language
English
Primarily Uses
i think i figured it out, ill test it now but i changed the code around abit

      if $survival_v[2] <= 0

        $game_temp.fade_type = fade 

        $game_player.reserve_transfer(19, 1, 9, 2)

        $survival_v[2] += 100                                     

      end # if $survival_v[2] <= 0

      if $survival_v[3] >= TOXINMAX

        $game_temp.fade_type = fade

        $game_player.reserve_transfer(19, 1, 9, 2)

        $survival_v[3] += 100

      end # if $survival_v[3] <= 0

      if $survival_v[4] >= TOXINMAX

        $game_temp.fade_type = fade

        $game_player.reserve_transfer(19, 1, 9, 2)

        $survival_v[4] += 100

      end # if $survival_v[4] <= 0

    end # if $game_switches[sURVIVALSWITCH] == true

  end # def update
 

kaarnij

Villager
Member
Joined
Aug 30, 2015
Messages
21
Reaction score
0
First Language
English
Primarily Uses
thank you very much Sinweaver. I got everything working now you've been a massive help, cant thank you enough!
 

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

Latest Threads

Latest Profile Posts

It seems like this is going to be another remote semester. RIP.
I don't like linear gear progression in games. I'd like to see more gear be useful from start to finish. This is also true for skills. I also like finding overpowered gear, and don't enjoy games that are too balanced.
Framework is getting closer to completion. Adding more QoL changes for users.
I'm very excited with DE:VOID! And FYI Darkness of Hope - The Pocket Watch in development, so please be excited!
The more I look at the QPlugins... The more I am amazed at what they can do. Which I'm not going to lie is pretty awkward, because I already consider them far and away the best plugins MV has to offer. :kaoback:

Forum statistics

Threads
99,509
Messages
966,189
Members
131,138
Latest member
MrRenato
Top