Jump to content
  • 0

Error with custom status: "[Error]: status_change_start: Invalid status change (2001)!"


OffGrid

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   2
  • Joined:  05/29/20
  • Last Seen:  

Hello, i'm fairly new to this and i've been trying to add a custom status (it's basically a buff that increases movement speed) and I am getting an error "[Error]: status_change_start: Invalid status change (2001)!". I'm not sure what if there's anything i've missed from all the searching i've done but so far i've made changes to the following files:

 

1) status.cpp

Added:

if( sc->getSCE(SC_VIPMSPD) )
        val = max( val, 25 );


        
2) status.hpp

Added:

SC_VIPMSPD = 2001,

Before:

 SC_MAX,


    
3) script_constants.hpp

Added:

 export_constant(SC_VIPMSPD);
 export_deprecated_constant2("SI_VIPMSPD",2001);
 export_constant(EFST_VIPMSPD);


    
4) efstids.lub

Added:

 EFST_VIPMSPD = 2001,


    
5) stateiconimginfo.lub

Added:

[EFST_IDs.EFST_VIPMSPD] = "vipmspd.tga"


    
6) stateiconinfo_f.lub

Added:

 StateIconList[EFST_IDs.EFST_VIPMSPD] = {
	haveTimeLimit = 1,
	posTimeLimitStr = 2,
	descript = {
		{ "VIP Movement Speed", COLOR_TITLE_BUFF },
		{ "%s", COLOR_TIME },
		{ "Increases Movement Speed" }
	}
}


    
7) stateiconinfo.lub

Added:

EFST_IDs.EFST_VIPMSPD


    
I've been going through the forums and have been trying the solutions posted there but couldn't for the life of me resolve it. I've recompiled the server multiple times now and still no luck. Any guidance is appreciated. Thank you.


UPDATE (SOLVED):

Resolved this by cleaning the stateinfo files (efstids.lub, stateiconimginfo.lub, stateiconinfo_f.lub, and stateiconinfo.lub) in my GRF (data/luafiles514/lua files/stateinfo) by deleting all the other stuff in it and left just my custom status.
Thanks to all those who helped!

Edited by OffGrid
Added solution
  • Like 1
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   33
  • Joined:  06/22/13
  • Last Seen:  

2 hours ago, OffGrid said:

I've added the status.yml now and it is now working (I can call it using "sc_start" on a script), however, I still don't see the status icon I made even though I made sure that the file name is correct. I did try using other icons though that I know works but it still doesn't show an icon. I may have missed another thing but couldn't identify what.

well you gotta check your stateicon. That was my problem not so long ago. Patch your client without the ignore error. see if stateicon is going to popup as an error so you can correct what line is missing.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   33
  • Joined:  06/22/13
  • Last Seen:  

10 hours ago, OffGrid said:

Hello, i'm fairly new to this and i've been trying to add a custom status (it's basically a buff that increases movement speed) and I am getting an error "[Error]: status_change_start: Invalid status change (2001)!". I'm not sure what if there's anything i've missed from all the searching i've done but so far i've made changes to the following files:

 

1) status.cpp

Added:

if( sc->getSCE(SC_VIPMSPD) )
        val = max( val, 25 );


        
2) status.hpp

Added:

SC_VIPMSPD = 2001,

Before:

 SC_MAX,


    
3) script_constants.hpp

Added:

 export_constant(SC_VIPMSPD);
 export_deprecated_constant2("SI_VIPMSPD",2001);
 export_constant(EFST_VIPMSPD);


    
4) efstids.lub

Added:

 EFST_VIPMSPD = 2001,


    
5) stateiconimginfo.lub

Added:

[EFST_IDs.EFST_VIPMSPD] = "vipmspd.tga"


    
6) stateiconinfo_f.lub

Added:

 StateIconList[EFST_IDs.EFST_VIPMSPD] = {
	haveTimeLimit = 1,
	posTimeLimitStr = 2,
	descript = {
		{ "VIP Movement Speed", COLOR_TITLE_BUFF },
		{ "%s", COLOR_TIME },
		{ "Increases Movement Speed" }
	}
}


    
7) stateiconinfo.lub

Added:

EFST_IDs.EFST_VIPMSPD


    
I've been going through the forums and have been trying the solutions posted there but couldn't for the life of me resolve it. I've recompiled the server multiple times now and still no luck. Any guidance is appreciated. Thank you.

I think you need to add something like this in your status.yml

  - Status: VIPMSPD
    Icon: EFST_VIPMSPD
    CalcFlags:
      Speed: true
      Flee: true
    Flags:
      NoClearbuff: true
      NoBanishingBuster: true
      NoClearance: true
    EndOnStart:
      Decreaseagi: true

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   2
  • Joined:  05/29/20
  • Last Seen:  

3 hours ago, Louis T Steinhil said:

I think you need to add something like this in your status.yml

  - Status: VIPMSPD
    Icon: EFST_VIPMSPD
    CalcFlags:
      Speed: true
      Flee: true
    Flags:
      NoClearbuff: true
      NoBanishingBuster: true
      NoClearance: true
    EndOnStart:
      Decreaseagi: true

 

I've added the status.yml now and it is now working (I can call it using "sc_start" on a script), however, I still don't see the status icon I made even though I made sure that the file name is correct. I did try using other icons though that I know works but it still doesn't show an icon. I may have missed another thing but couldn't identify what.

Edited by OffGrid
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   2
  • Joined:  05/29/20
  • Last Seen:  

It was actually the stateicon files that caused the problem. Didn't realize that the error I get with opening the game was related to the issue with getting the custom status icon to show up.

It is now resolved. Thanks for your insights and help!

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   33
  • Joined:  06/22/13
  • Last Seen:  

Kindly check on the answer so everyone would know this is resolved. Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...