Jump to content

Model dismemberment


MoJo JoJo

Recommended Posts

Posted

I'm unable to make the dismemberment work since I installed OpenJK. Well, it's like you said.. only one enemy will lose a head or be cut in half every now and then. How should I proceed to do the same thing as you?

This fix only works if you're custom compiling OpenJK.

 

Otherwise, what's happening in the game is that there is a hard-coded limit on the amount of NPCs that are decap-enabled -- by default it's 16. That means if there are more than 16 NPCs loaded on a level, only the first 16 loaded will be dismemberable. To raise this limit you need to change the MAX_SABER_VICTIMS line in the code, as @@MoJo JoJo has instructed earlier in this thread, and build a custom OpenJK SP binary for the game with this change applied. I recommend a minimum of 64 if your hardware can handle the game smoothly.

Stoiss likes this
Posted

Are you sure it uses the first 16 NPC entities and not just the first 16 you dismember?

 

Maybe we should consider looking into changing all those arrays into a struct and put the struct into vector or something if it can be made to be compatible. With a vector there isn't a perceived limit on the amount you can have but obviously you'd still be limited to the number of free entities as well.

Stoiss and Cerez like this
Posted

Yes, I'm pretty sure it is the first number of NPCs that it loads on the map, as you'll sometimes find it stops working with one bunch of NPCs, and then continues working with another few. So it's not that you've hit the cap as a player. Reloading the level produces exactly the same result with the same NPCs, so the behaviour is consistent. The first number of NPCs loaded are dismember-enabled, and the rest is treated standard.

 

What you're proposing does sound useful. We shouldn't have to change the game's code to set how many NPCs can fall apart in the game. This would be a useful update to OpenJK, but we have to be careful, as this hardcoded setting has been a part of the game since the beginning, and any changes to it will need to be tested thoroughly.

Posted

Yes, I'm pretty sure it is the first number of NPCs that it loads on the map, as you'll sometimes find it stops working with one bunch of NPCs, and then continues working with another few. So it's not that you've hit the cap as a player. Reloading the level produces exactly the same result with the same NPCs, so the behaviour is consistent. The first number of NPCs loaded are dismember-enabled, and the rest is treated standard.

 

What you're proposing does sound useful. We shouldn't have to change the game's code to set how many NPCs can fall apart in the game. This would be a useful update to OpenJK, but we have to be careful, as this hardcoded setting has been a part of the game since the beginning, and any changes to it will need to be tested thoroughly.

It's not only the first 16, it's 16 at any time as long as there aren't already to many entities. That's why when you're playing an SP campaign level it won't work most of the time because there are already so many entities.

 

When you're in a small map like mp/duel1 where there's hardly any entities at all, like if you spawn a bunch of stormtroopers, like 30, only 16 of them will dismember and the others won't. When all of the dead bodies have cleared up then it'll work again except for the last 14 that you spawn in the group of 30 that you made, but any others that you spawn after the clear up will dismember.

Cerez likes this
Posted

This applies to new spawns, but with NPCs already added to the level, they will all be dismember-disabled past the first 16 loaded on the map. The game sets the dismember setting on an NPC before spawning, basically. Once spawned, that's it.

Posted

I understand not so much of the discussion in detail

but i hope someone can do this for the vanilla dynamic link library. (for sp set it to 99)

Or is there any description to de- and recompile the necessary engine files?
I mean MVStudio++ gives sometimes errors due of older code in new version of studio

and people need to customize or adjust the code.
Like with Half-Life 2 and his tutorial Third Person View modifications.

SirSmite likes this
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
-Farengar Secret-Fire
  • 2 weeks later...
Posted

I understand not so much of the discussion in detail

but i hope someone can do this for the vanilla dynamic link library. (for sp set it to 99)

Or is there any description to de- and recompile the necessary engine files?

I mean MVStudio++ gives sometimes errors due of older code in new version of studio

and people need to customize or adjust the code.

Like with Half-Life 2 and his tutorial Third Person View modifications.

 

I second that.

 

I tried doing it myself, but encountered a lot of errors along the way. Would totally appreciate if someone manages to do one with a higher cap limit.

Nardja Zuul likes this
Posted

I've searched in ddl files and executable with an HexEditor to change the cap value but there nothing which looks like.

"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
-Farengar Secret-Fire
  • 1 month later...
Posted

Yeah i'm downloading vs++2013ee (3 hours -.-) and i will give it a try again after several fails in other games.
Maybe i can solve it and then i will archive it on many homepages as possible.
It would be the cherry on the cake for my Unlocker Modification. *head shake*

"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
-Farengar Secret-Fire
Posted

I thought 2012 was recommended but no... thank you

i will never install this win10 trash. I think this is the end of JKJA for me!
Damn dismember function...  :angry:  ridiculous developers :mad:

Cerez likes this
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
-Farengar Secret-Fire
Posted

I guess i know a lot of it...
first i don't mean the functions

second it isn't safe in personal laws.
But who cares...

 

2013... but the OpenJK includes 2012 batch files?

and nobody said anything of the problems with that.

But as i said... no longer interested, Unlocker is Final

"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
-Farengar Secret-Fire
Posted

Unlocker is my modification compilation,

https://jkhub.org/files/file/2589-jka-singleplayer-unlocker/

where i added a dismember option without using console, hack or hook.
A script solution but the cap limit is still vanilla.

And it is to much work to update my system to win 8 or 10 to compile only the jagamex86.dll
Maybe in future, i will find somebody who can compile my modified source code for me.

EDIT:

I've found a solution to compile the modified code for me... BUT
to
ensure a complete dismember function like in JK2, it is even more necessary than just changing the number of MAX_SABER_VICTIMS.
(If you doing only that, people will still have some NPC's which can't dismembered, most time Stormtroopers = tested many times in vjun3)
I've tried several things with all necessary commands but in the end, i'm absolutely sure, it needs OpenJK executables and dircet link libraries to have it fully uncensored.
And that was not my goal... so now, at the end, it makes not much sense (for me) if you have a solution like my mod
or a tiny modified SP Game Library.
But i've reached another goal in that work...
changed the value of g_debugSaberLock in combination with other commands.
Now I have real movie duels with sabers which even more lock (more than 5 times in a map/level)
If I can find in the future some energy for Star Wars again, I will upload my latest version.

 

Until then...
May the Force be with you.

"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
-Farengar Secret-Fire
Posted

In general principle Windows 10 is utter garbage (thus far), I agree. And I have used it, but I make a conscious effort to stay away. Half of the computers it is installed on, it doesn't even work properly. And then there's the additional restrictions and hoops on user freedom it imposes to consider (same as the new versions of Mac OS X). You're paying for, and are forced to accept something that enchains you, basically, and cripples your freedom.

You can install MS VS 2015 on Windows 8.1 (or even Windows 7?) without a hassle if you have a working copy/installation. So far they have been lenient that way. Otherwise, you can use my custom, December 2015 build of OpenJK that has this change implemented (for up to 128 NPCs), among other small and useful base game enhancements (such as model opacity without cheats on the client side enabled, and silly bot bunny-hopping disabled).

Also, I have a clean fork of the 'official' December 2015 source, intended to stay, if you're interested in keeping your mod source steady. I may fork a stable source like this from the main source on a yearly basis for preservation purposes. This particular source is intended for VS 2013, as 2015 was not out yet, then, and so far it's proven pretty steady and reliable both for SP and MP -- I think fit even to be an official 1.0 release, but we'd need more people to test it to make sure. Not sure where the OpenJK project is up to now -- if we have a 1.0 release yet or not.

Note that no-one should really be developing on Windows XP anymore. You can still run old games and software on it, but it's no longer useful for up-to-date software tweaks and development. It's slowly truly starting to take the place of Windows 95/98 in computer history, becoming a legacy system. It had a nice, long run, can't complain there.

Posted

Thank you for the compiled OpenJK version...

i've started an quick and small test with my mod and your 2015 build in t1_fatal.
And it worked a little bit more.
I was able to dismember one of the first stormtroopers. NPC number 8 and 9.
In Vanilla i am only able to dismember the npc number 8.
And on NPC number 11 or 12 you are able to dismember nearly every npc.
But i will test it again without my unlocker and i hope it reached my goal. :-)

Someone knows if it is possible to integrate the wp.saber.cpp/.h, g_main.cpp, g_cmds.cpp, g_svcmds.cpp, g_combat.cpp from JK2?
And replacement or something?
 

regards,
Nardja

"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
-Farengar Secret-Fire
Posted

EDITED... solved via pm

"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
-Farengar Secret-Fire
  • 3 months later...
Posted

Oh, it turns out that the issue is not OpenJK related after all, cuz' I just compiled the original jedi academy source code and the same damn thing happened. So I have not a clue what would be different in JK3 from JK2 that's causing the dismemberment failure when the "MAX_SABER_VICTIMS" limit is exceeded in JK3.

 

Edit: I found out that if an NPC is stored at a higher entity number like 32 or higher (that's the number I guess anyway) then it won't be dismembered, and they also take a little more saber damage. This makes much sense if your in a map with a lot of entities because the lower number entity slots are already taken, and no NPC you spawn will be able to be dismembered until you have gotten rid of one or more of those low number entities. They will be stored at higher numbers and the player can always be dismembered because the player is always at entity 0.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...