lfnetwork.com mark read register faq members calendar

Thread: Fun and frustration with scripting! need help
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 01-03-2004, 05:31 AM   #1
override367
 
override367's Avatar
 
Join Date: Apr 2003
Posts: 58
Exclamation Fun and frustration with scripting! need help

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.



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... **

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

Last edited by tk102; 02-08-2005 at 09:42 AM.
override367 is offline   you may: quote & reply,
Old 01-03-2004, 05:42 AM   #2
eidospsogos
Veteran
 
eidospsogos's Avatar
 
Join Date: Oct 2003
Posts: 906
amen!! unfortunately i know nothing of the programming aspect and am solely depending on others to let me know how to get into the skins so i can do what i normally do with games.
eidospsogos is offline   you may: quote & reply,
Old 01-03-2004, 06:24 AM   #3
override367
 
override367's Avatar
 
Join Date: Apr 2003
Posts: 58
Post

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
---------------



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!




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?
override367 is offline   you may: quote & reply,
Old 01-03-2004, 06:41 AM   #4
eidospsogos
Veteran
 
eidospsogos's Avatar
 
Join Date: Oct 2003
Posts: 906
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.
eidospsogos is offline   you may: quote & reply,
Old 01-03-2004, 06:45 AM   #5
override367
 
override367's Avatar
 
Join Date: Apr 2003
Posts: 58
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
override367 is offline   you may: quote & reply,
Old 01-03-2004, 06:53 AM   #6
eidospsogos
Veteran
 
eidospsogos's Avatar
 
Join Date: Oct 2003
Posts: 906
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.
eidospsogos is offline   you may: quote & reply,
Old 01-03-2004, 06:58 AM   #7
override367
 
override367's Avatar
 
Join Date: Apr 2003
Posts: 58
Im gonna try some more stuff, like using Hk47 as a jedi

but anyway I made a post dedicated to this, refer there for anymroe info
override367 is offline   you may: quote & reply,
Old 01-03-2004, 06:58 AM   #8
override367
 
override367's Avatar
 
Join Date: Apr 2003
Posts: 58
Im gonna try some more stuff, like using Hk47 as a jedi

but anyway I made a post dedicated to this, refer there for anymroe info
override367 is offline   you may: quote & reply,
Old 01-03-2004, 06:59 AM   #9
Grau
Lurker
 
Join Date: Jan 2004
Posts: 4
What did you use to compile the script?
Did you use any #includes?
Where did you find the different disguise types?
ect...

need more info :-p
Grau is offline   you may: quote & reply,
Old 01-03-2004, 07:01 AM   #10
override367
 
override367's Avatar
 
Join Date: Apr 2003
Posts: 58
Ill answer if you post in the "How to change the player model " thread
override367 is offline   you may: quote & reply,
Old 01-03-2004, 10:00 AM   #11
HazardX
Rookie
 
HazardX's Avatar
 
Join Date: Dec 2003
Posts: 20
To make the player become a Jedi i made this function:

Code:
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.

Last edited by HazardX; 01-03-2004 at 10:40 AM.
HazardX is offline   you may: quote & reply,
Old 01-03-2004, 01:16 PM   #12
Lil' Jawa
Rookie
 
Lil' Jawa's Avatar
 
Join Date: Dec 2003
Location: Sweden
Posts: 101
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"


Fer all your KOTOR modding needs:
http://www.sith-res.tk

..Press any key to continue..
Lil' Jawa is offline   you may: quote & reply,
Old 01-03-2004, 05:43 PM   #13
override367
 
override367's Avatar
 
Join Date: Apr 2003
Posts: 58
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
override367 is offline   you may: quote & reply,
Old 01-03-2004, 05:47 PM   #14
Lil' Jawa
Rookie
 
Lil' Jawa's Avatar
 
Join Date: Dec 2003
Location: Sweden
Posts: 101
wow a triplepost ..that just shows how much these forums suck though :/


Fer all your KOTOR modding needs:
http://www.sith-res.tk

..Press any key to continue..
Lil' Jawa is offline   you may: quote & reply,
Old 01-03-2004, 05:49 PM   #15
override367
 
override367's Avatar
 
Join Date: Apr 2003
Posts: 58
i fixed it, dumb thing didnt go through so i retyped it and then the first one came through and 2 of the next post
override367 is offline   you may: quote & reply,
Old 01-03-2004, 06:21 PM   #16
override367
 
override367's Avatar
 
Join Date: Apr 2003
Posts: 58
stupid question, how do i get all these NCS files to show up in neverwinter nights' script editor?? it only lets me import .erfs
override367 is offline   you may: quote & reply,
Old 01-04-2004, 05:35 AM   #17
Stator
Rookie
 
Stator's Avatar
 
Join Date: Jan 2004
Posts: 81
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
Stator is offline   you may: quote & reply,
Old 01-04-2004, 06:08 PM   #18
Lil' Jawa
Rookie
 
Lil' Jawa's Avatar
 
Join Date: Dec 2003
Location: Sweden
Posts: 101
I'm releasing a new version of my mod so you wont have to edit it if you want to play neutral or have different starting items etc like many requested.
I'll post it shortly.


Fer all your KOTOR modding needs:
http://www.sith-res.tk

..Press any key to continue..
Lil' Jawa is offline   you may: quote & reply,
Old 01-04-2004, 06:15 PM   #19
xxss
Rookie
 
xxss's Avatar
 
Join Date: Jan 2004
Posts: 65
How about incorporating the new revan player model discovered by overdrive? That would be cool
xxss is offline   you may: quote & reply,
Old 01-05-2004, 05:56 AM   #20
override367
 
override367's Avatar
 
Join Date: Apr 2003
Posts: 58
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
override367 is offline   you may: quote & reply,
Old 01-05-2004, 10:30 AM   #21
HazardX
Rookie
 
HazardX's Avatar
 
Join Date: Dec 2003
Posts: 20
Yes it is possible to write it like this:

Code:
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:
Code:
BecomeJedi(JEDI_PATH_GUARDIAN);
HazardX is offline   you may: quote & reply,
Old 01-05-2004, 11:35 AM   #22
Lil' Jawa
Rookie
 
Lil' Jawa's Avatar
 
Join Date: Dec 2003
Location: Sweden
Posts: 101
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


Fer all your KOTOR modding needs:
http://www.sith-res.tk

..Press any key to continue..
Lil' Jawa is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Fun and frustration with scripting! need help

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:36 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.