Jump to content
Louis T Steinhil

Endless Tower Instance with Difficulties

Recommended Posts

Endless Tower Instance with Difficulties


A small tweak on Endless Tower Instance.

Increases Monsters HP, Attack, Def/Mdef, Flee and Hit per difficulty.

Rewards Instance Points Easy, Vet, Nightmare, Hell & Torment.

Generates Alias to monsters if you're on different difficulty.

Added Emistry's Currency Shop

 

Note: You are going to experience this since there's a limit on setunitdata.
image.png.6c9d9053b0a46c89cdadb3c7def32511.png

The workaround to this is:

find this in setunitdata (src/map/script.c)
 

	case UDT_STR:
	case UDT_AGI:
	case UDT_VIT:
	case UDT_INT:
	case UDT_DEX:
	case UDT_LUK:
	case UDT_STATPOINT:
	case UDT_ATKRANGE:
	case UDT_ATKMIN:
	case UDT_ATKMAX:
	case UDT_MATKMIN:
	case UDT_MATKMAX:
	case UDT_AMOTION:
	case UDT_ADELAY:
	case UDT_DMOTION:
		//setunitdata_check_bounds(4, 0, USHRT_MAX); <---comment out then add
		setunitdata_check_min(4, 0);
		break;
	case UDT_DEF:

 

 

EndlessTower.txt


 

Share this post


Link to post
Share on other sites

Hello, I think you have uploaded the wrong file here :) it is a card collector.txt, not endless tower.

 

On a side note, doing this change in setunitdata:

 

	case UDT_DMOTION:
		//setunitdata_check_bounds(4, 0, USHRT_MAX); <---comment out then add
		setunitdata_check_min(4, 0);
		break;

 

is not increasing the limit. You just disabled the safety check and is letting the compiler set whatever value it wants (there is a logic to what is setting but this is a bit level and I don't know 100% how to expain/whether it is consistent on all compilers).

 

These variables are not big enough to support values higher than ~65000 (USHRT_MAX). It doesn't error out because the code is doing a cast, and it will simply ignore part of the value and go ahead with whatever the casting resolves to. (Which will be between 0 and ~65000).

 

From an online compiler, 96,000 will actually become 30,464 and 120,000 will actually be 54,464.

 

Try doing a getunitdata after you set it and you will see the real value.

 

To go over 65k at least the variables needs to be changed from short to int, I am not sure if this would be enough or this would cause issues in other parts, but unless this is done, you can't set a value higher than 65k (and that's why you see this error in vanilla herc)

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.