WB Tutorial Questions

Discussion in 'General Modification' started by Ranth, Jan 17, 2009.

Remove all ads!
  1. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    Who is it that you're trying to have talk?

    These are the scripts from the dying peasants in the CE vignette (py00191):

    Code:
    def san_dying( attachee, triggerer ):
    	game.global_vars[28] = game.global_vars[28] + 1
    	if (game.global_vars[28] >= 5):
    		game.obj_create(14330, game.leader.location)
    	return RUN_DEFAULT
    
    def san_exit_combat( attachee, triggerer ):
    	if (attachee.stat_level_get(stat_subdual_damage) >= attachee.stat_level_get(stat_hp_current)):
    		game.global_vars[28] = game.global_vars[28] + 1
    		if (game.global_vars[28] >= 5):
    			game.obj_create(14330, game.leader.location)
    	return RUN_DEFAULT
    and the talking peasant from CE (py00199):

    Code:
    def san_dialog( attachee, triggerer ):
    	triggerer.begin_dialog(attachee,1)
    	return SKIP_DEFAULT
    
    def san_heartbeat( attachee, triggerer ):
    	for obj in game.obj_list_vicinity(attachee.location,OLC_PC):
    		if (critter_is_unconscious(obj) == 0):
    			attachee.turn_towards(obj)
    			obj.begin_dialog(attachee,1)
    			game.new_sid = 0
    			return RUN_DEFAULT
    	return RUN_DEFAULT
    Once 14330 (the speaking peasant) gets created, his scripts take over. As you can see, you don't actually talk to one of the combatants; the speaker is new.
     
  2. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Wow thanks Gaear. Thats kinda what I am trying to do, but using my generic spawner to pop a heatbeat script once the four of them die. I will definetly use some of that code.

    Now when I walk in the room, the lead cleric/priest is naked until I attack him, then he has clothes. I forgot how frustrating modding was.
     
  3. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    He'll have his clothes from the get in the next version of the mod. When you pull a mob's inventory from invensource.mes, they come equipped and ready to go. Spawning them causes the delay sometimes.
     
  4. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    I figured out the 'chat when die' problem. My spawner was on OF_OFF. Apparently when the spawner is on OF_OFF it can do everything except talk to people.
     
  5. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Grrr... I fixed almost everything and then the hextor priest would not talk to me. I narrowed it down to the scr file (because it would not increment the death variable anymore either), but could not solve it.

    I decided to reload a previously saved mod and start over, and somehow it wont load my saved games. It shows me some of the older saves, and I have transfered my new saves to modules/save/ (I can see the correct save icons) but it wont show them in the load list. This kind of screws me and my testing/modding.

    Edit: Got the old saves working somehow. Still lost. I have been working on this mod for three days and I can no longer think.

    Update: Are there any DLG tools to find syntax errors, not to create dialog?
     
    Last edited: Aug 11, 2009
  6. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,745
    Likes Received:
    375
    Loading up the files in ProtoEd can show up some syntax errors quickly enough.

    If you are still having issues with your 'leader....' script, may I suggest you change it to 'game.leader'? The game always knows who that is (game.party[0]) whereas some scripts use 'leader', but only after they have defined who that is.
     
  7. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Is there a way to make an NPC dual wield even if the two weapons I give him are not light weapons? Ex: Putting two longswords in his inventory and having him dual wield them even though it would give him a penalty?
     
  8. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Also, is there a way to remove door icons that are embedded in sector files? I tried deleting the sector files but it did not help.
     
  9. wizgeorge

    wizgeorge Prophet of Wizardy

    Joined:
    Feb 19, 2005
    Messages:
    1,715
    Likes Received:
    2
    With twoweaponfighting any 2 weapons can be used, but there are penalties for a rogue. A level of fighter or the weps prof feat for the weapon of choice corrects that. My rogue had the +3Longsword (from the Lamia), and the Blade of Fury from the drow leader with wepprof(longsword). Works good. The great cleaver works great with 2wepsfighting also.
     
  10. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    Don't delete sector files. You need them.

    Open the sector containing the door(s) in question In WorldBuilder, then click the Static Objects tab. Your portals will be listed here and can safely be removed from the sector.
     
  11. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    WG,

    Can I have the npc equip two longswords if I only do their inventory.mes file to equip them, and then spawn them? Or do I need to create them to be a mob file and put them on the map?

    Right now he has two swords in his inventory.mes, but only holds one in his hand.
     
  12. wizgeorge

    wizgeorge Prophet of Wizardy

    Joined:
    Feb 19, 2005
    Messages:
    1,715
    Likes Received:
    2
    I've created an alternate invensource for Fruella and she comes in with 2 cleavers, blue elven chain, etc. 2wepsfighting in protos, etc. Should work. Have to have the 2weps feat to work good with no penalties.
     
  13. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Ok its crunch time and I really need help on this one guys.

    Problem: All of my interior castle maps are black with no graphics on them. I can teleport to them though.
    Assumed Issue: That World Builder is not splitting my JPEGs correctly.
    Reasoning: I am using the Verb map as a template (for dimensions in the mes/rules files). The Verb map tiles start with a B###### sequence and WB is starting my tiles with a 000000 sequence. Therefore, I do not think the game knows where to put my tiles.

    What I did:
    1. Followed all of the "how to make a map" instructions.
    2. Recombined Verb map
    3. Opened Verb map in Photoshop
    4. Put my castle map on top of it, saved as a jpeg (to retain map dimensions)
    5. Took WB's txt file from Verb map and renamed it as my jpeg name (to give correct coords)
    6. Put both castle jpeg and txt in same folder.
    7. Direct WB to the castle jpeg, split, and it makes a folder in the root WB directory (not in 2d Maps)
    8. Said folder is not naming the jpeg tiles correctly.

    Does anyone have any ideas? I thought when I was using XP (Vista now) it put the folder in the 2d Maps folder, but I may be wrong.
     
  14. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    It sounds like you're doing it right Ranth, but something must be getting lost in translation. Rather than try to analyze what that might be, if you can find a host site, put your map up there, link here, and I'll do it for you. Probably won't be til tomorrow though.
     
  15. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    255
    When you combine a map, a text file is created with starting co-ordinates in it, you need those to be able to split your map using the same file names.

    I suggest you recombine the template map and get the text file that comes with it.
     
Our Host!