Author Topic: Initial game values in zsdx  (Read 2108 times)

0 Members and 1 Guest are viewing this topic.

Starlock

  • Full Member
  • ***
  • Posts: 114
    • View Profile
Initial game values in zsdx
« on: May 03, 2016, 04:16:11 AM »
Hey, I've just started to try and implement @froggy77 's level and xp system. However, his system is based around zelda roth and my game is based around zsdx code.

http://forum.solarus-games.org/index.php/topic,520.0.html

I believe the problem is declaring new savegame values, however nothing I've tried seems to work. I tried changing everything to roth, but that turned out to be a lot more trouble than I expected. I tried putting the values at the end of the savegames code and that didn't seem to do anything. Where should initial values be saved in zsdx?

Renkineko
  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: Initial game values in zsdx
« Reply #1 on: May 03, 2016, 07:46:03 AM »
There is no initial values for savegames : it exists or not. If it exists, when you call the getter, it will return its values, else it will return nil. (Source: http://www.solarus-games.org/doc/latest/lua_api_game.html#lua_api_game_get_value )

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Initial game values in zsdx
« Reply #2 on: May 03, 2016, 12:18:17 PM »
The initial values of a savegame in zsdx are in savegame.lua

Just search for
Code: [Select]
set_initial_values in this file.
And initialize whatever values you want.