View Full Version : Sand Creatures
06-11-2006, 04:27 AM
i have spawned a few sand creatures before and i think there awesome, but when i go though the code, i cant find anything todo with sand_creature or any sorta AI for it. can anyone give me a pointer? or what files has the AI for it?
06-11-2006, 12:17 PM
Search for SandCreature. Then you should find NPCSandCreature references and also functions with SandCreature in their names. Though there is a CLASS_SAND_CREATURE you should have found reference too. Maybe your lower-case search was case sensitive and you missed it.
Also you should have come up with this line in NPC_stats.c:
else if ( !Q_stricmp( "sand_creature", type ))
I wonder why it didn't show up in your search?
06-11-2006, 02:23 PM
OJP's code is using the SP version of the AI code for the sand creatures. The basejka source code doesn't have sand creatures in it at all.
06-12-2006, 12:53 AM
so where in the OJP code is the sand creatures AI defined, and what your telling me is that u have the SP code? does that mean you could have tavions sith scepter working? and maybe ragnos?
06-12-2006, 01:05 AM
I do have the SP code for the NPC AI...but that's it.
The sand creature AI is located mostly in NPC_AI_Sand_creature.c of the OJP source files.
I haven't even touched Ragnos yet but I did technically port the AI parts of the scepter stuff (but never tested it).
06-12-2006, 02:50 AM
so maybe we can get a tavion that uses the scepter in kor2? =D
06-12-2006, 05:18 AM
Razor are you at liberty to say where you got your hands on any SP code? (!)
06-12-2006, 01:41 PM
From one of the guys at Raven. Duh! :)
Anyway, it's supposed to be a low profile thing.
06-12-2006, 02:05 PM
OK I won't shout it from the rooftops.
Can anything NPCs can be made to do in SP now be scripted in MP then, with OJP? Basic and Enhanced?
If it's not done being ported, then is it something a low-skilled person could help with or is it advanced stuff?
06-12-2006, 02:42 PM
Most of the individual AI files are relatively easy to port as long as you have a decent understanding of C++/C and know how to find equivilent functions to replace SP functions that don't exist. The key is to convert everything you can and leave the rest commented out so that we can impliment it later.
I've ported several of the AI files and Tinny has done a couple as well (including the sand creature code).
However, the core navigation code is very complicated since we're missing serveral library files. Fortunately, MP's engine based navigation works for the most part, but it doesn't allow the direct access needed for some of the more subtle NPC behaviors.
As such, I've been on and off trying to create code to make the full SP navigation code work. That's what the SPNAVCODEPORT branch on the repository is.
vBulletin®, Copyright ©2000-2016, Jelsoft Enterprises Ltd.