Index for element ID

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Am I correct in thinking that the index for element ID starts at 0, not at 1?

Thanks.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Isn't normal attack element -1? I thought I remembered one script that had to treat normal attacks as -1 for some reason.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
AFAIK, 0 is for none. The entries on the database don't use the 0 index, if it says 1 it uses the index 1.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Well I know that params, exparams and sparams, begin at 0, so that PHA is 3, even though it's the 4th on the list (I've just been using it, that's why that example comes to mind), and I seem to be getting odd results with elements beginning at 1, which is why I thought they might be 0 as well.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Well, you don't specify those params in the database, they're already there. I was talking about the ones that you specify on the database. :)


Technically, they all do start with 0. It's just that for those entries, 0 is either reserved (like in the case of elements) or totally unused (for most of the other entries that y ou specify).
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I do need to use them for Yanfly's Element Absorb script where I have to specify the element by its ID.  Which is why I need to know precisely if element IDs start at 0 or at 1, as I'm getting slightly odd things happening, and I want to eliminate one possible source of the error.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Technically, they start at -1, but -1 is for physical attack, and 0 is for none. For the script you mentioned I've had no problem with it as long as I use the same id as listed in the system tab of the database for the element.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Thanks for the clarification.

That's one possible cause crossed off the list then.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top