Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Fun and frustration with scripting! need help

Page: 1 of 1
 override367
01-03-2004, 5:31 AM
#1
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
 eidospsogos
01-03-2004, 5:42 AM
#2
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. :)
 override367
01-03-2004, 6:24 AM
#3
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
---------------
http://img.villagephotos.com/p/2004-1/579017/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!

http://img.villagephotos.com/p/2004-1/579017/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?
 eidospsogos
01-03-2004, 6:41 AM
#4
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.
 override367
01-03-2004, 6:45 AM
#5
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
 eidospsogos
01-03-2004, 6:53 AM
#6
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.
 override367
01-03-2004, 6:58 AM
#7
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
01-03-2004, 6:58 AM
#8
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
 Grau
01-03-2004, 6:59 AM
#9
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
 override367
01-03-2004, 7:01 AM
#10
Ill answer if you post in the "How to change the player model " thread :)
 HazardX
01-03-2004, 10:00 AM
#11
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.
 Lil' Jawa
01-03-2004, 1:16 PM
#12
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" ;)
 override367
01-03-2004, 5:43 PM
#13
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 :)
 Lil' Jawa
01-03-2004, 5:47 PM
#14
wow a triplepost :)..that just shows how much these forums suck though :/
 override367
01-03-2004, 5:49 PM
#15
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
01-03-2004, 6:21 PM
#16
stupid question, how do i get all these NCS files to show up in neverwinter nights' script editor?? it only lets me import .erfs
 Stator
01-04-2004, 5:35 AM
#17
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
 Lil' Jawa
01-04-2004, 6:08 PM
#18
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.
 xxss
01-04-2004, 6:15 PM
#19
How about incorporating the new revan player model discovered by overdrive? That would be cool :)
 override367
01-05-2004, 5:56 AM
#20
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
 HazardX
01-05-2004, 10:30 AM
#21
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);
 Lil' Jawa
01-05-2004, 11:35 AM
#22
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
Page: 1 of 1