Louis T Steinhil 4 Posted July 12 View File 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. 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 Submitter Louis T Steinhil Submitted 07/12/24 Category Events & Games Quote Share this post Link to post Share on other sites
KirieZ 88 Posted July 18 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) Quote Share this post Link to post Share on other sites