Author Topic: Horses cep2.3  (Read 758 times)

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Horses cep2.3
« Reply #15 on: February 05, 2013, 05:55:04 pm »


               The gloves where the first thing I made with Cep in mind since they where the first that came with horses. Later I made the horsecall method for regular Nwn. Just to clarify things. So there are two sperate methods. Mainly all the onenter would do would be to delete the local mount I, so that the PC will have the horse being mounted cleared. Also certain stipulations like a NoMount set to 1 might be in order for areas, like indoors, where horses should not be mounted. I do not know about trying to integrate Cep with the normal horse scripts, which handle this sort of thing. Since they are basically seperate from each other. Probably best to do as you are doing and just going Cep to prevent confusion.

So indoors in the the Cep method I would have the gloves unequipped on enter, rudimetary I know, and that would dismount you.  Then the onequip for the gloves, as I recall, would no allow you to put them on in areas where horses where not allowed. So with an activatable item you want to put in a line if NoMount ==1 return;
for instance. Then all areas with NoMount set to 1 would not allow the item to be used, no horses allowed.
Also in the onenter Bioware has an auto dismount feature which may not work out of the box, though it might dismount you it still would not reset the mount variable.  That was an aside but you want to dismount the player when they try to enter an area that has NoMount set to 1 and adjust there mounted status.  You can simply use the Zep dismount function for this, and run it as an executable on all door that lead from outdoor to internal areas.
Various methods are possible.  For further clarification you could look at the second method separately which uses an activatable item, this is the one I made for Nwn not Cep and look at the onenter for that one.
               
               

               


                     Modifié par ffbj, 05 février 2013 - 06:06 .
                     
                  


            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Horses cep2.3
« Reply #16 on: February 05, 2013, 06:35:06 pm »


               So for the Cep gloves which you will not be using I had this onenter or buildings:
//Put this script OnEnter call it nomount
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
object oItem;
oItem = GetItemInSlot(INVENTORY_SLOT_ARMS, oPC);

if(GetLocalInt(oPC, "Mounted") != 1)
return;

if (GetIsObjectValid(oItem))
{
AssignCommand(oPC, ActionUnequipItem(oItem));
FadeToBlack(oPC, FADE_SPEED_FASTEST);
DelayCommand(2.8, FadeFromBlack(oPC, FADE_SPEED_FASTEST));
}
}

Then I would just put a line in the on enter of the area which restricts mounts:
ExecuteScript("nomount",GetModule());

Now with the advent of horse support non Cep you have the functions that check for mount restricted areas selected by a variable. Thus:

if (!GetLocalInt(oAreaTarget,"X3_MOUNT_OK_EXCEPTION"))
{ // check for global restrictions
if (GetLocalInt(GetModule(),"X3_MOUNTS_EXTERNAL_ONLY")&&GetIsAreaInterior(oAreaTarget)) bNoMounts=TRUE;
else if (GetLocalInt(GetModule(),"X3_MOUNTS_NO_UNDERGROUND")&&!GetIsAreaAboveGround(oAreaTarget)) bNoMounts=TRUE;
} // check for global restrictions
etc... but since Cep does not use the same method the module does not know you are mounted, so you just have to do it manually. Of course some clever soul could probably just use these functions through Cep by adding a variable like the MountI which was really something internal which I still use. Thus it covers those in my Orilion Nights module that either dismount properly or just click on the door while mounted. That's where those above functions come in the player will they be auto dismounted at that point if they just click on the door.
               
               

               


                     Modifié par ffbj, 05 février 2013 - 06:48 .
                     
                  


            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Horses cep2.3
« Reply #17 on: February 06, 2013, 01:03:47 am »


                Thanks for your help ffbj.

':wizard:'
               
               

               
            

Legacy_cmwise

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Horses cep2.3
« Reply #18 on: February 14, 2013, 02:12:53 am »


               Some really great ideas here and if I was a better scripter I might be able to modify zep_on_activate2 and either destroy the extra horse before the PC could spawn another or check the local area for "his" horse and abort with a text stating "you already have a horse" .  But alas..any change I make to the on activate script just kills the script.

I looked at some of the other horse systems/scripts..like I said great but I am retro fitting the Horsie thing into my mod.
For whatever reason CEP's horses and mounts didn't even load into my palettes so I am making them from scratch. Overall the lack of "real" documentation and support of the CEP horses and mounts is aggravating. Even their starter module doesnt contain all of the horses and mounts.

so the issue is keep it simple and just make it so I dont have each PC running around with a herd of horses!

any ideas about the on activate or is that the wrong approach to cure the multiple spawns of horsies?
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Horses cep2.3
« Reply #19 on: February 16, 2013, 04:16:13 pm »


               I beleive arises from the fact that Cep horses came about before horses where officially introduced.  This would be the general problem with trying to integrate them into the now horses supported NwN.  Anyhow you can still use functions from the new horse scripts within a Cep system.  Though I have not tried it.  The main thing to determine is how many features you want to include.
To your specific problem.  Too many horses.  The first thing is that there are functions within the default system to check for this such as:
(HorseGetHasAHorse(oPC) checks to see if PC has a horse.
(HorseGetIsMounted(oPC) checks to see if PC is mounted.
The bioware include:  You need to put this script at the top of any script which calls for, i.e. includes the various horse function described therein.
#include "x3_inc_horse"
So either of those should help.  I do not know how Cep designates horse ownership so you may not find those functions useful. In other words if Cep does not declare the person as mounted or in ownership of a horse they will have no effect.
In my system I added a Mount variable to indicate being mounted.  That should work with any system as long as you have the requisite database object which can have variables written to it.
So I have the line:
if (GetLocalInt(oDatabase, "Mounted") == 1)
return;
So if the above statement is true the PC is mounted and no other mounts can be called.
Therefore if you create the database object and add the above line to your horse mounting script and the PC is mounted the script will return.  That is stop at that point.
But, you protest, I don't have a database object.
If you want to create a database item make a single, non-stackable item call it Database and then lower case it database would be the tag and database would be the resref.  Then onclient enter you have:
object oDatabase = GetItemPossessedBy(oPC, "database");
    if (!GetIsObjectValid(oDatabase))
    {
      // Now create the database object on the PC
      CreateItemOnObject("database", oPC, 1);

    }
If they don not have one make  them one.  Then you can write variables to the object.  Very useful for a number of things.  Make the item plot not dropable or transferable.
You also need a line in the horse script that checks the PC for the database object:
object oDatabase = GetItemPossessedBy(oPC, "database");
That should give you some help.
I have not looked at the Cep horse scripts in a long time.  So it might be a good idea to post your current horse script so the specific problem can be addressed.  Btw there can be other problems associated with horese asside from having a string of them.  Actually that one is the easiest to solve.  Also check custom content or Cep searches related to horeses.
               
               

               
            

Legacy_cmwise

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Horses cep2.3
« Reply #20 on: February 19, 2013, 05:42:41 am »


               Thanks ffbj...I get what you're saying. It just seems confusing that there are so many horse (CEP,CRAP,DLA) scripts all wound around each other. When I look at the include and on activate scripts..there seems like a better(simpler) way to script a horse system. Perhaps that is what your system is?  I haven't tried it yet. But honestly didnt want to have to use an item that would have to be equiped. I am not a scripter and totally self taught, which means I have enough info to be detrimental to my module and not enough to fix it! Thanks for the suggestions and help.

CEP owndership seems to be set upon dismount. Once the horse is "dismissed" it seems to be gone, the summon widget simply summons another horse of the same color. Once mounted and dismounted the horse becomes yours for the duration until dismissed either by logging off or using a widget which i cant get to work.  The zep_onactivate2 seems to be the heart for  setting the name and summoning, includes flying too. It appears to assign the variable wyrmling (oWyrmling) to the hourse. I'm not a scripter and have lost patience with this horse thing.

Walking isnt all that bad anyways!':lol:'
               
               

               


                     Modifié par cmwise, 19 février 2013 - 05:51 .
                     
                  


            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Horses cep2.3
« Reply #21 on: February 23, 2013, 04:11:32 pm »


               Ok so I'm having trouble changing the appearrance of the horse .

I want to use the horses with armor.

How do I do that ?
               
               

               
            

Legacy_cmwise

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Horses cep2.3
« Reply #22 on: February 25, 2013, 06:52:27 am »


               I did a download of the CEP horses update. It included the on_zep_activate2 file which contains all the horses that are available to the builder.

For whatever reason none of the horses actually appeared in the palette. So I've gone in and made up mine to match the corresponding horse that is listed in the on_zep_activate2 file, the horse is in the palette they just dont appear under any of the directories.

So each horse, for me anyway,  has become a custom horse. I dont use the armored or barded models at this time, but they were in the palette.

The whole set up for just the CEP and one DLA horse was time consuming and tedious. That is probably why there are other horse systems/scripts offered by some very competent developers.

I finally found the conversation file that goes on each horse so you can have them follow or dismiss the horse. I  use the "hitching_post" so that the horse has a place to "hang" while I have a drink at the local Pub.'<img'>
               
               

               
            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Horses cep2.3
« Reply #23 on: February 25, 2013, 11:55:58 am »


               

cmwise wrote...



For whatever reason none of the horses actually appeared in the palette. So I've gone in and made up mine to match the corresponding horse that is listed in the on_zep_activate2 file, the horse is in the palette they just dont appear under any of the directories.





I have been there lol.I scratched my head trying to figure out where these horses are.

What I am doing now is testing two ways of having horses.

1) I am using ffbj's system but with a wand .

2) I am using a wand to spawn in the standard 1.69 horses.No converstion for them but they work on the radial             menu and have many settings.And they are on the palette!

     We are testing these both .

     I still cant figure out where to change the appaerance of the horse with ffbj's.Please point me to the armor                horse appearance line.I looked in the zep_phenos and cant find it.  
               
               

               


                     Modifié par Knight_Shield, 25 février 2013 - 11:57 .
                     
                  


            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Horses cep2.3
« Reply #24 on: February 27, 2013, 02:45:40 am »


               I think the horses are all listed like this:
nMount = nCEP_PH_HORSE_BLACK;
So that would be the horse you get. My version of Cep has, in zep_phenos:
switch (nMount)
{
case nCEP_PH_HORSE_AURENTHIL:
case nCEP_PH_HORSE_AURENTHIL_L:
case nCEP_PH_HORSE_BLACK:
case nCEP_PH_HORSE_BLACK_L:
case nCEP_PH_HORSE_BROWN:
case nCEP_PH_HORSE_BROWN_L:
case nCEP_PH_HORSE_NIGHTMARE:
case nCEP_PH_HORSE_NIGHTMARE_L:
case nCEP_PH_HORSE_WHITE:
case nCEP_PH_HORSE_WHITE_L:
case nCEP_PH_PONY_BROWN:
case nCEP_PH_PONY_BROWN_L:
case nCEP_PH_PONY_LTBROWN:
case nCEP_PH_PONY_LTBROWN_L:
case nCEP_PH_PONY_SPOT:
case nCEP_PH_PONY_SPOT_L:
}
Not much help, I suppose.
You may want to pm GoG.
               
               

               


                     Modifié par ffbj, 27 février 2013 - 02:47 .
                     
                  


            

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Horses cep2.3
« Reply #25 on: March 01, 2013, 07:33:07 pm »


               I believe horse appearances can be found in the tailmodel 2da
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Horses cep2.3
« Reply #26 on: March 02, 2013, 03:51:50 pm »


               http://social.biowar.../index/15448613