Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Aurora Toolset, A Dance with Codex

Gahbreeil

Scholar
Joined
Feb 9, 2021
Messages
1,086
Location
Asarlaíocht
The NWN Lexicon Gargaune linked above was my go-to resource when I was teaching myself the toolset, for what it is worth.

You should be able to assign the PC to start a conversation with the PC (see here):

AssignCommand(oPC,ActionStartConversation(oPC,"conv_name",FALSE,FALSE))

I'll be trying this shortly.

It took me around a ten minutes to understand, or rather port into english, that GetModule sets the script to the exact object that the module is. If I used oPC instead of GetModule, upon the PC dying, the script would wonk out because of the vanilla scripts. I think. In any case, GetModule sets the object of the counter to the module itself rather than an, in example, character.

void main()
{
object oSlayer = GetLastKiller();
object oPC = GetLastKiller();
if (GetIsPC(oSlayer) && GetIsPC(GetFactionLeader(oSlayer)))
{
object oRatCounter = GetModule();

int iSlayedRats = GetLocalInt(oRatCounter, "iSlayedRats");
if (iSlayedRats == -1)
iSlayedRats = 1;
else iSlayedRats++;

SetLocalInt(oRatCounter, "iSlayedRats", iSlayedRats);

if (iSlayedRats == 3)
AddJournalQuestEntry("ctf_rats", 2, oPC, FALSE);
}
}
 

damager

Liturgist
Joined
Jan 19, 2016
Messages
1,802
KOTC2 toolset get a load of that nigger really :lol:
KotC2 is actually a fun to play game, unlike NWN, so it's a good suggestion.
It's a shit suggestion. NWN toolset is easy to learn for somebody like Gahb and there's thousands of usermade enviroments and objects to make beautiful detailed areas possible. And hundreds of usermade tutorials for every shit imaginable.

KotC2 is really fuckin horrible btw. The interface is horrible. The graphics sucks. Everything moves in fuckin lightning speed. Everything feels clunky and wooden and unresponsive. If the game is this accessable I can only imagine how the toolset works for a total beginner.

It wins in being turn based and that is all.
 

Gargaune

Arcane
Joined
Mar 12, 2020
Messages
3,717
if (GetIsPC(oSlayer) && GetIsPC(GetFactionLeader(oSlayer)))
Careful, that's the wrong operand. The one I gave you had ||, meaning it validated that the killer was either the PC OR an NPC in the PC's party, you've used AND which will work when the PC kills a rat, but not for henchmen etc. But anyway, the main issue was the object your were setting your variables on, you've figured that out so you're on the right track, good luck!

P.S. Use [code] [/code] tags instead of spoilers when posting code on forums, they'll keep your indents.


Which is far superior to NWN, which is slow as molasses.
Bro, do you even level-up?
doyouevenlift.png
 

Gahbreeil

Scholar
Joined
Feb 9, 2021
Messages
1,086
Location
Asarlaíocht
Code:
void main()
{
    object oPC = GetEnteringObject();
    int nCount;
    object oItem;
    int nGold=GetGold(oPC);

    if ( !GetIsPC(oPC)  ||  GetIsDMPossessed(oPC) )
        return;

    if ( GetLocalInt(OBJECT_SELF, "DO_ONCE") )
        return;
    SetLocalInt(OBJECT_SELF, "DO_ONCE", TRUE);

    oItem = GetFirstItemInInventory(oPC);
    while ( oItem != OBJECT_INVALID )
    {
        DestroyObject(oItem);
        oItem = GetNextItemInInventory(oPC);
    }

    nCount = NUM_INVENTORY_SLOTS;
    while ( nCount-- > 0 )
    {
        oItem = GetItemInSlot(nCount, oPC);
        DestroyObject(oItem);
    }

    TakeGoldFromCreature(nGold, oPC, TRUE);

    SetDescription(oPC,
                   "Thou art a caitiff. An outcast and an outlaw \n" +
                   "wherever thou might wander.", TRUE);

    ActionStartConversation(oPC, "ctf_prologue", TRUE, FALSE);

}

Why in the name of the Seven Hells of Baator would this not work fully as an OnSpawn event while it works as a trigger?
 

Gargaune

Arcane
Joined
Mar 12, 2020
Messages
3,717
Why in the name of the Seven Hells of Baator would this not work fully as an OnSpawn event while it works as a trigger?
Highlight GetEnteringObject in the Script Editor (double-click it):
Code:
// The value returned by this function depends on the object type of the caller:
// 1) If the caller is a door it returns the object that last
//    triggered it.
// 2) If the caller is a trigger, area of effect, module, area or encounter[/b] it
//    returns the object that last entered it.
// * Return value on error: OBJECT_INVALID
//  When used for doors, this should only be called from the OnAreaTransitionClick
//  event.  Otherwise, it should only be called in OnEnter scripts.

If you wanted to use it on a creature's OnSpawn (for some unfathomable reason), you'd have to use OBJECT_SELF instead. But if you want to use it for the PC at start as intended, it needs to be called from the module's OnClientEnter script.

General tip - when trying to debug scripts, write in some FloatingTextStringOnCreature() calls to see whether they're called, how far you're getting and what intermediate data's being processed, e.g. FloatingTextStringOnCreature("the oPC object is: " + GetName(oPC), GetFirstPC()); right under your object oPC = GetEnteringObject(); and you can remove them once everything's working right.
 

Gahbreeil

Scholar
Joined
Feb 9, 2021
Messages
1,086
Location
Asarlaíocht
Code:
void main()
{
    string sName = GetName(GetPCSpeaker());
    object oPC = GetPCSpeaker();
    if (GetLocalInt(OBJECT_SELF, sName+"meerfin") == 0)
    {
    ActionSpeakString("[This fellow o' elven heritage ignores thee past a grimace.]", TALKVOLUME_TALK);
    SetLocalInt(OBJECT_SELF, sName+"meerfin", 1);
    }
    else
    if (GetLocalInt(OBJECT_SELF, sName+"meerfin") == 1)
    {
    ClearAllActions(FALSE);
    BeginConversation();
    }
    else
    if(GetLocalInt(OBJECT_SELF, sName+"meerfin")==2)
    {
    AssignCommand(OBJECT_SELF, ActionAttack(oPC, FALSE));
    }
}

Code:
void main()
{
    string sName = GetName(GetPCSpeaker());
    SetLocalInt(GetObjectByTag("ctf_richard", 1), sName+"spoketochilde", 1);
    ActionSpeakString("I cannot talk with thee, speak to my father.", TALKVOLUME_TALK);
}

int StartingConditional()
{
    string sName = GetName(GetPCSpeaker());
    if (GetLocalInt(GetObjectByTag("ctf_richard", 1), sName+"spoketochilde")==1) return TRUE;
    else return FALSE;
}

I feel like a complete dummy but the first script didn't work at all. Now the only part that does not is the third one, that the NPC attacks the PC. I have no clue on how to proceed. The second is about the child speaking a floating message and that setting an integer for its father to speak a different dialogue node.

It's fun. It's tough. But I'm learning. I'm not looking for no hand out but I can credit everyone who helps.
 

Gargaune

Arcane
Joined
Mar 12, 2020
Messages
3,717
Can't tell about the first, if you're looking to start a proper fight, the usual way is to either make the entire faction hostile or just swap the one NPC into the Hostile faction, then use DetermineCombatRound(), see the Lexicon notes on ActionAttack(). Just crack open another module where you recall a comparable scenario and see how they did it there.

The second - assuming those are two separate scripts - it's probably your objects again. GetPCSpeaker() returns the PC in that dialogue, and I'm guessing wherever you're calling the set you're not in dialogue mode, causing your local variables to mismatch. This is why I said to use a floating text debug to check what your scripts are actually doing. Off the top of my head, if the NPC's spouting the text when used, you probably want to have GetLastUsedBy() instead, but it's simpler to just have them speak the one line in dialogue mode, don't complicate your life.
 

d1nolore

Savant
Joined
May 31, 2017
Messages
721
The toolset is extremely easy to use. Just build areas and fill them with npcs, placeables etc then use the quest wizard and stuff to make quests. Once you learn how to make decent stuff you can get more advanced with scripting.

Don’t underestimate how much time it takes to build something decent in the nwn toolset. It’s a lot of work; areas, npcs, outfits, items, monsters, placeables, sounds, music, dialogues, quests, scripted systems, cut scenes. You can also use custom content to make things more thematic; tilesets, portraits, music, items, placeables, creatures, etc.
 

Gahbreeil

Scholar
Joined
Feb 9, 2021
Messages
1,086
Location
Asarlaíocht
I've found myself unable to either compile or make the scripts work as intended sometimes and I am changing the vision rather than finishing the scripts. Regardless, progress is happening.

I'm not going to read 500 A4 pages of explanations for scripts different than the ones I want to make. And yes, LS's Script Generator was brilliant. Now, I kind'a know what's what.
 

Just Locus

Educated
Joined
Mar 11, 2022
Messages
597
Location
Termina

Gahbreeil

Played through the module and it's fine for what it is, though I sincerely hope that the game won't take place in a region where everyone talks in old English/Shakespearean as it would get really grating after even 20 minutes.
 

Gahbreeil

Scholar
Joined
Feb 9, 2021
Messages
1,086
Location
Asarlaíocht
I don't know what, who or how but my henchman started a dialogue with an NPC. Might be because the henchman was on "Guard Me"?

Regardless, I feel confident that I can achieve what I have set out to do. Just Locus, it is Shakespearean through and through. Apologies but since I'm the only modder, I pick the direction.
 

Gahbreeil

Scholar
Joined
Feb 9, 2021
Messages
1,086
Location
Asarlaíocht
Gargaune, I love you already but can you listen to one last plea from me? I would like to ask you to check my module on your own Aurora Toolset, you have permission to do so, and tell me everything that you can. That should kickstart my brain not to need anyone's help anymore. I know you might not have the time or the Enhanced Edition + all Premium Modules so it's cool if you don't want to.

https://neverwintervault.org/project/nwn1/module/caitiff
 

Zeriel

Arcane
Joined
Jun 17, 2012
Messages
14,048
Have you tried eating 5-7 grams of psilocybe cubensis mushrooms before writing, from my experience it helps
I used to binge smoke street cannabis to the point that someone sold me a gramme of wormwood. I survived a blunt, a fingernail's length off of a cigarette is the amount of 'bacco and, well, 0.2 of a gramme of wormwood? That's the amount of cannabis that I usually used.

I'm sober nowadays.

Update: I managed to script the prologue. It's not easy but understandable once you get what is what. Scripts won't work right away but they sure as hell will once you understand why they don't. There is no chance of impossibility.

  1. Dialogue.
  2. Animation of worship before the ending.
  3. Fade out to black and teleport to next area at the end.
Come on, 'dex, I know you've got it in you to take this seriously.

You're about 23 years late to the party, fam. Even the janitor who cleaned up the leftovers is retired.
 

Gahbreeil

Scholar
Joined
Feb 9, 2021
Messages
1,086
Location
Asarlaíocht
You're about 23 years late to the party, fam. Even the janitor who cleaned up the leftovers is retired.
I had around a 20 downloads on a capitalised D E M O. It's not that bad. I agree Beamdog could've upped the models to KotOR but they did something else. IDC.
 

Gargaune

Arcane
Joined
Mar 12, 2020
Messages
3,717
Gargaune, I love you already but can you listen to one last plea from me? I would like to ask you to check my module on your own Aurora Toolset, you have permission to do so, and tell me everything that you can. That should kickstart my brain not to need anyone's help anymore. I know you might not have the time or the Enhanced Edition + all Premium Modules so it's cool if you don't want to.

https://neverwintervault.org/project/nwn1/module/caitiff
Sorry, no time. If you've got players on the Vault, use their feedback.
 

Justinian

Arcane
Developer
Joined
Oct 21, 2022
Messages
292
if you want feedback you really should get it mostly from players rather than devs, most of which barely have time to play their own game. There are probably reddit/discord groups dedicated to testing.
 

Gahbreeil

Scholar
Joined
Feb 9, 2021
Messages
1,086
Location
Asarlaíocht
No, no, it's ok. Garguane offered some proper help so I wondered whether he has some time to school me. And I need help in scripting moreso than in deciding the setting/plot/dialogues. It's cool, anyway.

The response here wasn't too toxic so I have some conviction to actually carry on. Also, did anyone get that I am interested in starting a modding team? Yes, it makes more sense in my mind if it's the modding team that has creative direction rather than the players.

Before you eat me alive and spit me out... I offered that we make a module together, I'm making one on my own so far. Which is what you've wanted? I think... I do not ignore feedback. It's my module so I'm trying my best to create an engaging narrative. Might not be everyone's cup of tea but I think Archaic English is fun.
 

Kruyurk

Learned
Joined
Nov 16, 2021
Messages
514
I eke bethink thee shouldst stand ho being a dram wench each timeth someone gives thee a comment yond thee liketh not.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom