Don't have a ton of time to dig through all of the files and figure out whats what.. RL interfers. But, I'd like to lend a hand where I can. I'm a skilled developer and would be willing to put together some tools to aid in editing & modifying the .MES files. You know, like the NPC conversation text and being able to view all of the conversation paths - things of that nature. If someones figured out the formats, I should be able to do a tool for it. Would tools like this be usefull? Is anyone working on some of them? Any requests? - BB
Actually, a dialogue editor would kick som mighty ass I think Dhoom said he was going to come up with a list of functions available to be called - from that all that we need is implementation time to get a dialogue editor going If you want to get started by all means go to it, I don't believe anyone else is working on a tool for this, but I'd see what Dhoom has to say about the func list etc as well.
Sounds good - I'll see what I can come up with over the next few nights, and make it available when it's useable.
I've been digging through .dlg files, compiling a list of fuctions, gets, and their variables... here's what I've got so far... I'll annotate it a bit more, the notes there are for my reference, but I have a lot more memorized. EDIT:: Ignore the BB before any line... my quick reference to needing to bold this, as it's not a true/false call, but a modifier. --------- Field #5 is a "check" field, Field #7 is the "Do" field. == is a 'check' and = is a 'set'. pc.skill_level_get(npc,skill_diplomacy) >= 10 //diplomacy, intimidate, bluff, gatherinformation, sense_motive game.quests[3].state = qs_unknown //qs_<unknown/mentioned/accepted/botched/completed> 3 refers to quest number in .mes file, I think anyone( pc.group_list(), "has_item", 3000 //3000 = protos.tab item number game.global_flags[300] == 0 //can be 1 party_transfer_to( npc, 3000 ) //again, protos.tab # reference npc.item_transfer_to_by_proto(pc,5006) npc.reaction_adj( pc,15) pc.item_find(5800) != OBJ_HANDLE_NULL pc.stat_level_get(stat_level_druid) == 0 // 1 or 0 toggle for yes/no pc.stat_level_get(stat_charisma) >= 16 // >= equal or better, display text choice game.areas[2] = 1 // toggle to show game area on overland map 1/yes 0/no game.story_state = 1 // no idea. BB game.worldmap_travel_by_dialog(3) // End conversation, move party to map #3 game.global_flags[67] == 0 // on / off toggle game.party_alignment == CHAOTIC_GOOD // LAWFUL_GOOD, LAWFUL_EVIL, LAWFUL_NEUTRAL, etc. npc.attack(pc) game.global_vars[4] == 5 npc.has_met(pc) not npc.has_met(pc) //reverse of "has met pc" line above. npc.leader_get() != OBJ_HANDLE_NULL pc.money_get() >= 1000 //checks the party's funds, display text choice if funds are 1000cp or higher (10gp). BB pc.money_adj(-1000) // adjust value of party money by -1000, which is 10gp. BB free_rep( npc, pc ) pc.stat_level_get( stat_gender ) == gender_female //male/female game.global_vars[6] = game.global_vars[6] + 10 pc.stat_level_get( stat_deity ) != 16 // if PC deity = #, display this line (ref deity.mes file for #?) game.picker( npc, spell_cure_light_wounds, should_heal_hp_on, [ 290, 320, 350 ] ) npc.cast_spell( spell_cure_light_wounds, picker_obj ) npc.spells_pending_to_memorized() anyone( pc.group_list(), "has_follower", 8000 ) //check to see if NPC #___ is in the group, if so, display this text pc.reputation_add( 4 ) create_item_in_inventory(4222,pc) // 4222 = ref protos.tab for item. I assume PC can be switched to NPC, as well. pc.follower_atmax() == 0 pc.follower_add( npc ) //can we add ANY NPC as a follower?? Yes -- attachee specific. THis funcion will add NPC to party. pc.follower_remove( npc ) npc.area != 1 // tell NPC to stay in this area after removal? buttin(npc,pc,675) // No clue... relationship flag? @pcname@ // variable... use this in Field 2 or 3, and it will input speaking PCs name game.fade_and_teleport(0,0,0,5001,494,226) pc.d20_query(Q_IsFallenPaladin) == 1 //check pally status pc.has_atoned()} //regain pally status if fallen run_off( npc, pc ) game.fade_and_teleport( 14400, 0, 0, 5113, 481, 501 ) pc.barter(npc) //open NPC's store ------------------------------------- New version = 9/26/03 8:45am PST
Great - thanks. Been poking around the dlg, npc py, and gamequestlog files, think I can put something pretty slick together in a fairly short period of time. First pass will be to allow you to set params and pick your way through the quest dialogs. I'll worry about editing it after we're sure that it lists info properly.
game.story_state = 1 // no idea. This advances the story . Say in story 1 you have just started In story x npc change dialogues and certain quests are available . Say you killed the dragon part of the main quest x advances to 10 so the npc now have that new option to congratulate you about killing the dragon. And say now you can kill the second dragon that appears because now xbigger or equal to 10.
Well, yeah... I can read, man.. heh It says "game_story_state"... so I kind of figured it had something to do with that What I meant, and probably should have said, is that I have no idea what this REFERENCES... but remember.. those // notes were for my benefit while I'm working on decyphering that doc. heh. and "official" version will be more concise, and formated better.
If anyone find a file with what each of the states and global vars means, please post it. It'd help to be able to put meaningful text with each of the dialog actions. ie: game.global_vars[23] game.story_state Never should of started thinking about this during the daytime.. all day long, whenever I have some brainpower to spare I've got designs for this utility chugging away eating up the spare CPU cycles.. *grin* Can't wait to get home and start coding it.
You guys are making me wish I learned something other than script languages. Knew I should have taken that damn C++ course instead of PERL. I can't find ANY file that holds or discusses global variables... I think they're in the .exe
Quick update before I crash for the night - gotta be up in a few hrs for work... haha Got the base loader working, you can scroll through each of the NPC's and all of their text. After thinking about it, it will be pretty easy to add in a save feature. The biggest issue will be adding in sanity checks to be sure someone doesn't screw up everything by having recursive links, things like that. I'm going for 2 basic parts, one will be the editor, and then also have a View option where you can walk through all of the dialog choices. Next on my "todo" list is to add in parsing of the initial NPC load (from the .py files) which loads a bunch of initial dialog conditionals ( ie. items equiped, quests started), and also be able to parse out conditions within the dialogs (ie. Charisma, items equiped, npc's in the party). One more good night of work and I should have something ready for you guys to start playing with.. FYI - found some pretty good text in there... there's no doubt there was once a bordello in the game! lol... not sure I'd be comforatable with Mary and her sheep.. Actually looks like the text in the bordello was pretty tame, not nearly as good as the prisoner... "[looks around nervously] I suppose I might be interested, if the size is right. Now drop your drawers and let me see what you got!" This could lead to some really interesting mods.
-Broken thats sounds figgin' awesome I can't wait...it's a b*tch staring at those dialogue files all day. WhooHooo!!