e-mods.net

Nod Engine SDK => Modeling and NOT Editor => Topic started by: morgwin on 2012-09-03, 08:47:53

Title: My npc summonable?
Post by: morgwin on 2012-09-03, 08:47:53
Hi,

I've created my working Knight (that helps Christof) but i have to spawn him in console. I was wondering how i could add him him as a summonable discipline that will also follow Christof?. I was watching how to create disciplines but i am lacking the .java files with my Codex.nob.

Thanks :).
Title: Re: My npc summonable?
Post by: Javokis on 2012-09-03, 09:39:08
There's a number of source scripts included with the NodSDKProjects workbench folder available at the Open Nod Developments page though the Nod SDK also includes numerous source java scripts which make great examples. A good script to look at from the Nod SDK would be the DisciplineSummonSoul.java and any of the other "summon" discipline scripts. Simply replacing the SpawnThing template from those scripts with your knight would do the trick. You can find the Nihilistic's .java sources within the main VTMR directory under Codex>System if you installed the Nod SDK. But the best system I ever made would consist of the following scripts with my NodSDKProjects directory:

*AoRMod>src>discipline>DisciplineEntrancement.java - This has been modified from the original Nihilistic version.
*AoRMod>src>effects>EffectDiscEntrancement.java - Heavily modified simple reference icon for players to click to "unsummon"

The above disciplines will effect targets already in the world. For disciplines that spawn a companion, the follow will make a good example:

*AoRMod>src>discipline>DisciplineSummonSoul.java - Just replace the SpawnThingNear param with your template
*AoRMod>src>effects>EffectDiscSummonSoul.java - Reference icon so players can "unsummon" companion.

Now here are the main effects:

*AoRMod>src>effects>EffectSystemPetMaster.java - My pride and joy. ;)
*AoRMod>src>effects>EffectSystemPet.java

Also be sure to check the following effects.ned values within AoRMod>AoR.nob>misc>

Code: [Select]
ef_sys_petmaster                none                    0       EffectSystemPetMaster           0       0       0       0xC0     0       0       0       0       0       0       0       0       0
ef_pet                          FXPossessedIcon         1       EffectSystemPet                 27      0       0       0x0      0       0       0       1       2       3       4       5       6
ef_disc_entrancement            entrancementIcon        0       EffectDiscEntrancement          0       0       0       0x210   0       0       0       1       2       3       4       5       6
ef_disc_summonsoul              summonSoulIcon          0       EffectDiscSummonSoul            0       0       0       0x210   0       0       0       1       2       3       4       5       6

Enjoy. ;)
Title: Re: My npc summonable?
Post by: morgwin on 2012-09-03, 11:05:07
Thanks! I'll start with these now  :)
Title: Re: My npc summonable?
Post by: Javokis on 2012-09-03, 11:22:26
Oh a word of warning:

The new system references AoRConstants.java out of AoRMod>src>aorsys>AoRConstants.java so be sure to look at the declaration references out of it or your scripts will break.
Title: Re: My npc summonable?
Post by: morgwin on 2012-09-03, 11:28:45
Ok, I'll keep that in mind thanks :), I'm currently watching your Discipline tutorials.