|
apprentice
|
OP
apprentice
Joined: Aug 2014
|
The most basic of questions:
What exactly needs to be in _start in order for my mod to work correctly(dialog with global NPCs, combat, etc)? I dont want to install the bloat of a million unnecessary scripts, i just want to make _Start then my scripts. However, it seems most tutorials just assume you have the main scripts loaded.
PS: I'm using preset characters, not character creation.
|
|
|
|
member
|
member
Joined: Jul 2014
|
On init put
CHARACTER_Player1.isPlayer(); CHARACTER_Player2.isPlayer(); Proc_ResetCompanions(); Proc_ExclamationMarkCleanup();
On KB put
IF GameEventSet("GAMEEVENT_GameStarted")
THEN InitStory(); GoalCompleted;
PROC Proc_ExclamationMarkCleanup() AND _Player.IsPlayer() THEN CharacterStopAllEffectsWithName(_Player,"FX_GP_ExclamationMark_A"); CharacterSetHasDialog(_Player,0);
I misread your post. this is the one without character creation.
Replace the character_player1 and player 2 with your character names at the top.
Last edited by Demonata08; 03/08/14 03:48 AM.
|
|
|
|
apprentice
|
OP
apprentice
Joined: Aug 2014
|
Thanks! Unfortunately that's what i did have, which means there's a deeper problem  since i copy pasted everything but _start from a post that everyone else said was working, i thought my _start being different because i tried to not use char creation was the problem. Turns out it isn't. Still, good information to confirm. thanks. Edit: except i only specify one player. if i make the default party 4 people, do i need to do .isplayer for all 4? or can i just ask if player1 is a player? does it matter if 1 person is controlling all 4 or if i have 4 actual players?
Last edited by RestarttGaming; 03/08/14 04:13 AM.
|
|
|
|
member
|
member
Joined: Jul 2014
|
CHARACTER_Player1.isPlayer(); CHARACTER_Player2.isPlayer(); CHARACTER_Player3.isPlayer(); CHARACTER_Player4.isPlayer(); Proc_ResetCompanions(); Proc_ExclamationMarkCleanup();
On KB put
IF GameEventSet("GAMEEVENT_GameStarted")
THEN InitStory(); GoalCompleted;
PROC Proc_ExclamationMarkCleanup() AND _Player.IsPlayer() THEN CharacterStopAllEffectsWithName(_Player,"FX_GP_ExclamationMark_A"); CharacterSetHasDialog(_Player,0);
The best i can tell that should get a 4 player one going.
Tell me what kinda error your having and i can better help.
Last edited by Demonata08; 03/08/14 04:20 AM.
|
|
|
|
apprentice
|
OP
apprentice
Joined: Aug 2014
|
I've got the game up and running, but when i try using the dialog that works with non-global NPCs with global NPCs, the leave option just leaves me stuck in conversation.
I've followed larians example for how to get chatting to work, and it works great with non-globals. Then i used RogueLikes solution for getting globals to talk to you,
INIT: DB_Dialog(CHARACTER_NPCsName);
KB: IF DialogStartRequested(_Char, _Player) THEN StartDefaultDialog(_Char, _Player);
but when i talk to a global and non-global player using the same dialog file, the non-global works fine, and the global doesn't. The only thing i hadn't literally copied word for word from someone was the _start, since i modded it to not include the character creation, so i thought that might be it, but it seems not.
|
|
|
|
enthusiast
|
enthusiast
Joined: Oct 2013
|
For some reason for me the Dialog never ends even when the NPC isn't global. The behavior between GLOBAL and normal NPC is the same, in both cases my dialog works, but END does not end dialog. ;/ Interestingly when I hit END i see in the logs a "memory write error" each time I click, and when testing in D:OS itself, the game flat out crashes (on a NON GLOBAL dialog end)! My _start
Version 1
SubGoalCombiner SGC_AND
INITSECTION
CHARACTER_Player1.isPlayer();
//DB_Dialogs(CHARACTER_Guy,"Test1");
Proc_ResetCompanions();
Proc_ExclamationMarkCleanup();
KBSECTION
// Character Creation going on first start
IF
GameEventSet("GAMEEVENT_GameStarted")
AND
CharacterAddToCharacterCreation(CHARACTER_Player1,0,1)
THEN
InitStory();
// Go to Stale Start Location Trigger named GameBegins
IF
CharacterCreationFinished(CHARACTER_NULL)
THEN
CharacterTeleportPartyToTrigger(TRIGGER_GameBegins, "");
IF
DialogStartRequested(_Char, _Player)
THEN
StartDefaultDialog(_Char, _Player);
IF
RequestTrade(_char, _trader)
THEN
ActivateTrade(_char, _trader, 1, 1, 1);
IF
HappyWithDeal(_Player,_Npc,_ValuePlayer,_ValueNpc)
AND
_ValuePlayer >= _ValueNpc
THEN
ExecuteDeal(_Player,1,0);
EXITSECTION
ENDEXITSECTION
Something else is amiss, it's not the start script. The same thing worked when I tested it before the latest editor version. ;/
|
|
|
|
member
|
member
Joined: Jul 2014
|
This may sound like a silly response.
But did you check mark end dialog on one of the nodes on the keyword editor?
|
|
|
|
apprentice
|
OP
apprentice
Joined: Aug 2014
|
I did, which is why my dialog ends with normal characters, even though the same file doesn't work with globals
But i agree it may have gotten unset for the guy above.
|
|
|
|
enthusiast
|
enthusiast
Joined: Jul 2014
|
This 'dialog not properly ending' issue sounds suspiciously like the problem I started having yesterday with my two Rat NPCs. Oddly, my Guard NPC's dialog ends fine. All three are global. It was sending me a little insane last night as I could not figure out if I was doing something wrong or if the Editor was simply doing something weird (and I'm still not certain).
On a related note, I'd love to figure out just how the game devs handle their dialog. As far as I can tell, any NPC in the Main Campaign that has a complex dialog (ie. not just a speak-a-single-line-and-leave chicken-type conversation) doesn't use the 'DefaultDialog' section in the Sidebar. Their KeywordEditor also has a drop-down list of NPCs in the 'Speaker' section, which I can't get to populate in my module.
|
|
|
|
enthusiast
|
enthusiast
Joined: Oct 2013
|
This may sound like a silly response.
But did you check mark end dialog on one of the nodes on the keyword editor? yes  I even added the mark to a pushed secondary dialog option, and NEITHER ends my dialog. Global or not. I literally can not exit out of dialogs I initiate.. even if I set every single keyword to END DIALOG. Maybe something related to copying action templates over? Or Alignments? This actually only started after I got combat working.
|
|
|
|
member
|
member
Joined: Jul 2014
|
Okay, I've had some weird issues with the editor like that.
First of all unchecking global wont do anything, Because it only registers global entities in the story editor.. If it isnt global you cant send commands to it. So unchecking it after generating definitions that its global would cause an error
Try restarting it first. And then try it in the actual game.
Last edited by Demonata08; 03/08/14 06:49 AM.
|
|
|
|
enthusiast
|
enthusiast
Joined: Oct 2013
|
Okay, I've had some weird issues with the editor like that.
Try restarting it first. And then try it in the actual game.
Get back to me with the result and ill try to do some testing on it. I know  (I always rebuild/reload after everything I do) It literally crashes my game once I click "End Dialog" as in, crash to desktop. That's both on a char thats set to global and a char thats not global. Both use different keyword dialog files etc... and yes, I checked "Leave" to "End Dialog"  on both of em. I have literally managed to break my dialogs, completely. And I don't know why ;/
Last edited by eRe4s3r; 03/08/14 06:50 AM.
|
|
|
|
member
|
member
Joined: Jul 2014
|
This 'dialog not properly ending' issue sounds suspiciously like the problem I started having yesterday with my two Rat NPCs. Oddly, my Guard NPC's dialog ends fine. All three are global. It was sending me a little insane last night as I could not figure out if I was doing something wrong or if the Editor was simply doing something weird (and I'm still not certain).
On a related note, I'd love to figure out just how the game devs handle their dialog. As far as I can tell, any NPC in the Main Campaign that has a complex dialog (ie. not just a speak-a-single-line-and-leave chicken-type conversation) doesn't use the 'DefaultDialog' section in the Sidebar. Their KeywordEditor also has a drop-down list of NPCs in the 'Speaker' section, which I can't get to populate in my module. They assign important dialog through the story editor. I couldnt tell you where their speakers file is. But im sure its just a single txt file you have to import. Never really looked.
|
|
|
|
member
|
member
Joined: Jul 2014
|
Okay, I've had some weird issues with the editor like that.
Try restarting it first. And then try it in the actual game.
Get back to me with the result and ill try to do some testing on it. I know  (I always rebuild/reload after everything I do) It literally crashes my game once I click "End Dialog" as in, crash to desktop. That's both on a char thats set to global and a char thats not global. Both use different keyword dialog files etc... and yes, I checked "Leave" to "End Dialog"  on both of em. I have literally managed to break my dialogs, completely. And I don't know why ;/ Perhaps you can zip your starter mod up and let me take a look myself.
|
|
|
|
enthusiast
|
enthusiast
Joined: Oct 2013
|
Perhaps you can zip your starter mod up and let me take a look myself.
If you have the patience to do that I would be very grateful  But since I am testing with Norbyte on meshes you will get some.. stuff extra. otherwise it won't load since I am using custom assets in the char-gen map ,p (which is what pops up as Main-Camera if you load the mod in D:OS) Send you links via PM
|
|
|
|
enthusiast
|
enthusiast
Joined: Jul 2014
|
Cross-posting from the other thread, but I see that eRe4s3r has this issue too.. ------ Okay, for those having trouble with dialog, try using IF DialogStartRequested(_Player, _Char) THEN StartDefaultDialog(_Char, _Player);rather than IF DialogStartRequested(_Char, _Player) THEN StartDefaultDialog(_Char, _Player); This fixed one of my NPC's dialogs, but the other NPC is still acting funny (just funny in a different way). So I can't claim this will fix all yet! EDIT: EDIT: Okay, I figured out why one NPC worked and the other NPC was being ignored (like the earlier problem of trying to talk to Global characters). The NPC which works as a Global has a direct call to a dialog rather than relying on the DefaultDialog. The code which, for me, gives a successful dialog with a global NPC is IF
DialogStartRequested(CHARACTER_specific_npc, _Player)
THEN
DialogStartTwoSpeakerDialog("name_of_dialog",_Player,CHARACTER_specific_npc);
Last edited by Noaloha; 03/08/14 07:48 AM.
|
|
|
|
member
|
member
Joined: Jul 2014
|
Noel thats my bad. I knew that myself lol. As thats how i had forced a dialog with my global companion.
Last edited by Demonata08; 03/08/14 08:54 AM.
|
|
|
Moderated by Bvs, ForkTong, gbnf, Issh, Kurnster, Larian_QA, LarSeb, Lar_q, Lynn, Monodon, Raze, Stephen_Larian
|
|