Jump to content

Home

Fun and frustration with scripting! need help


override367

Recommended Posts

tk102 says: Okay, to whomever is reading this thread everyday * ... why? What compels you to look at this thread? It had value once long ago, but no longer. Please PM me to tell me why. :p

 

 

well I've been trying to take lil'jawa's mod and make it so instead of multiclassing it changes your existing class, and I am kind of a scripting newbie so I tried this..

 

SetLocalInt(GetPCSpeaker(), "nClass", GetLocalInt(GetPCSpeaker(), "CLASS_TYPE_JEDICONSULAR"));

 

seeing as it looked as if nClass was the players class

 

but it wont compile... it doesn't know what setlocalint is, hmm

 

is what I am trying to do even possible?

 

thanks for any input, I used to be pretty good at NWN modding but it has been a while so I suck, but this modding community can use all the help it can get right now what with the man trying to keep us down :)

 

 

*Darth333 says: I know who looks at this thread everyday... :p **

 

**tk102 says: And I know who looks at who looks at this thread everyday... :p

Link to comment
Share on other sites

Success ! my first mod attempt...well a failure

 

my second attempt was to change the players model ---- IT WORKED!!!!

 

This script

-------------

effect eDisg = EffectDisguise(DISGUISE_TYPE_N_DARTHREVAN);

 

ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDisg,oPC);

 

Does this

---------------

darth revan.JPG

 

 

If someone else has posted how to change the player model I'll feel stupid but using that command you can make the player look like almost anything in the game!

 

 

 

It may not be anything spectacular, but I'm quite proud of myself :)

 

 

look Im the stupid robot!

 

roboplayer.JPG

 

 

Sorry for spamming images but It's a big step for me because it is like the first time i've ever succesfully scripted anything (once in NWN I made arrows that disintigrated the target, but that was the most impressive thing I ever did)

 

thanks Lil'jawa and the other modders :)

 

EDIT: seems stupid villagephoto wont let me see the other picture for some reason, anyone know a better free picture hosting service?

Link to comment
Share on other sites

uhmm. no, no one has told us how to do this yet. this is abig step. were i you, i'd put it in it's own post so that everyone who has been wondering about this will know how to do it now. wow.

 

so, question. when you change your player model, which i can't see your images because the website said you had exceeded your daily limit and it's only 2 am. :), but can you use armor in the same way as you could before? this amy seem like a stupid question. but i am just wondering.

 

regardless this is a big step.

Link to comment
Share on other sites

Yes you can, but if you say... equip a lightsaber as t3-m4 or whatever the little guy's name is, it doesnt show up

 

and if your darth revan and equip armor you cant see it, but you can see the lightsaber

 

besides revan is so awesome looking WHO CARES if he cant display different armor types

Link to comment
Share on other sites

very true. i was wondering more for the sake of the bonuses one can get from armor.

 

but that sounds like an error i got when playing bg2 before. i started off as the typical paladin or fighter class, and when i dual classed into a mage :) none of the mages equipment would actually show up on the character. it would equip, but it was not visible.

Link to comment
Share on other sites

To make the player become a Jedi i made this function:

 

void BecomeJedi(int nJediPath)
{
 SetGlobalNumber("DAN_JEDI_PLOT", 7);
 SetGlobalBoolean("DAN_BELAYAT_DONE", TRUE);
 SetGlobalNumber("DAN_PATH_STATE", nJediPath);

   object oPC = GetFirstPC();

   if(nJediPath > 0)
   {

       if(nJediPath == JEDI_PATH_GUARDIAN)
       {
           AddMultiClass(CLASS_TYPE_JEDIGUARDIAN,oPC);
       }
       else if (nJediPath == JEDI_PATH_SENTINEL)
       {
           AddMultiClass(CLASS_TYPE_JEDISENTINEL,oPC);
       }
       else if (nJediPath == JEDI_PATH_CONSULAR)
       {
           AddMultiClass(CLASS_TYPE_JEDICONSULAR,oPC);
       }

   }

   ShowLevelUpGUI();
}

 

[EDIT]

Your way to change the player model works great, but the effect ist lost after a new level load.

Link to comment
Share on other sites

the variable JediPath is one set in Datooine ie it's null until you get there so why use it(you can't make any new dialogs to get opinions or ask the player yet) so I don't see the point in merely copying the dantooine script and thinking it will allow you to gain jedi classes(the above script wont work)

 

override367: good work, I think the russian discovered some way to do it too(though I don't know if it the same as your or if it fades after new level load).

 

HazardX: now we just gotta find a way to do dialogs so choosing can make some sense..or perhaps we could do a silly "open this or that chest or equip that item if you want to become sentinel or that other one if you want guardian" ;)

Link to comment
Share on other sites

well yea, but I wasn't expecting anything more than it lasting until a new level load

 

however I don't see why I can't just have the thing repeat, isn't there some sort of entering-new-area scripting function or something ?

 

bah, I'll figure it out

 

hell give me a few weeks ill have a set of equippable armors that change player models

 

after all I was the first one to stick 50 guns and an automatic missile launcher on bf1942s battleship just because someone told me it couldn't be done through simple text editing :)

Link to comment
Share on other sites

I'm not a scripter so please forgive my ignorance. I have been messing around with Lil Jawa's mod and also reading the work that Override has done for ideas. I have figured out how to adjust the new gear so that I don't get the sith mask or Revan's robe. Now is where my trouble starts. How can I make the alignment maintain dark side from the original or even change to light side? I always end up as neutral no matter what and I am only changing the new items. Also, for some reason when I make these changes, the scoundrel will no longer get a stealth belt in the foot locker. Any help will be greatly appreciated. Thanks in advance.

 

Stator

Link to comment
Share on other sites

I am actually pretty unfamiliar with scripting, how would I write a script to change a variable?

 

for instance if a script looked like this (just an example I know there is no such function)

 

cColor = getplayercolor;

 

in this case how would I change cColor? not what comes after the = sign, I want to change the actual result of the getplayercolor

 

actually let me show what I actually want to do, this returns what the player's class is

 

int nClass = GetClassByPosition(1,GetFirstPC());

 

so isn't there a way to write a command to change the RESULT of get nClass (like if the getclassbyposition returned CLASS_TYPE_SCOUNDREL that would be nClass, could I change it to say.. .CLASS_TYPE_JEDISENTINEL)

 

I don't see why this shouldn't be possible, then again I don't always remember to put pants on in the morning and sometimes pour coffee in my cereal thinking it's milk

Link to comment
Share on other sites

Yes it is possible to write it like this:

 

nClass = CLASS_TYPE_JEDISENTINEL;

 

But only for local variables. For Globals you should use the SetGlobal functions.

 

@Lil' Jawa:

My Jedi Script works very well. But it is a function, so you still have to start this procedure.

I'm setting those globals cause i DON'T want that the player has to make those pre-jedi quests on Dantooine.

 

You could start my script like this to get it running:

BecomeJedi(JEDI_PATH_GUARDIAN);

Link to comment
Share on other sites

I had intended on posting something here, but now I forgot because I got a 404 error after pressing reply button to post it..they really need to upgrade their servers here because they are waay to overloaded..

 

Anyway I found a funny thing, check the definition for SetGlobalString :D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...