WB Tutorial Questions

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

Remove all ads!
  1. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    Gaear,

    I respect very much the fact that you do not want list-only map areas, so how do you suggest I add the content/maps I am creating? Are we not limited by the # of map icons we can have, and therefore I would be stealing other places?

    Would it be o.k. if I just sent the adventurers for a quick detour to the location via dialogue, so the world map is not involved? Similiar to the witchs note, I dont believe that opened a world map location.
     
  2. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    Question regarding the invensource.mes file, how do you make a character dual wield? I notice that if I give an character two weapons in the file, they will only wield one. I know dual wielding is possible since the assassin dual wields and has it's own entry, but I cannot get anyone else to do it. Is there some syntax or parameters I need to know about?
     
  3. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    That's correct, we can't have any more worldmap icons. As it stands right now, we don't have any list-only worldmap locations besides Verbobonc (and that kind of makes sense since Verbobonc isn't within the geographical boundaries of the worldmap anyway), so yes, probably the preferable way would be to send players to your location(s) via dialogue.

    But ... I've always found the dialogue method to be a bit cludgy too, and we're trying to get away from cludginess, so ...

    Where/what are your locations, if I may ask? If they were 'near Nulb' or 'south of the temple' and that sort of thing, you could send players there via map transition (door) icons.
     
  4. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    Well my initial plans were to add 2 more map list locations. One to the mountains just west of Hommlet, and one north in the Kron Hills. At the moment, I think only the one in the mountains west of Hommlet will make it into the first release of my mod (so I can tell if people like the direction I am going before I work on an enormous amount of content).

    If the party was sent to the mountains west of Hommlet via dialogue, and it was not a map list location, would they be able to return via worldmap travel or would they need to dialogue out? I would assume we could allow them to leave via world map similiar to a random encounter (which has no set clickable location) but you know better than me.
     
  5. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    I'm not entirely sure about that. I would assume there is a flag somewhere that could set any map to being worldmap travel accessible, but I don't know what it is. Welkwood Bog, for example, only has one map that gets you to the worldmap, even though most of them are outdoor maps.
     
  6. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    I am pushing full steam on this expansion because I want it done by the end of the week if possible. But I do have a situation I dont know how to handle though...

    I want to spawn a new merchant in Hommlet after a global variable =1. I have a spawner script which will spawn them, but the tricky part is linking them to an invisible chest. These are the problems I see:

    If I have my spawner script do:
    Code:
    merchant = game.obj_create(14830, location_from_axis( 514, 460 ))
    Then I am unable to link them to an inventory source in WorldBuilder (because it is not a MOB file).

    If I make the merchant by creating a mob file, then the merchant will be in Hommlet before the global flag, but I will be able to link it to an invisible chest inventory source.

    How can I accomplish what I want to do?

    Note: I just realized someone was able to do this with Lareth in the Tower when he becomes a merchant... does anyone know how this was pulled off?
     
  7. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Still not sure how that was done but I betcha Lareth says 'encumbered' when you hover over him ;) He is selling out of his persnal inventory, possibly with his personal stuff flagged with something that sets it not to be sold.

    Otherwise - can't be done. You have to do it as mobs, its that simple. Have your mobs turned OF_OFFuntil needed, then turn them on in their first heartbeat. Note it has to be their own heartbeat: OFFed mobs don't show up in the 'vicinity'.
     
  8. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    Another question regarding the temple throne which goes away on the map, how is it done? I looked in the maps folder for the area and the only objects it includes is the ragged parchment and the generic_spawner which has a san_heartbeat for py334 in the scr folder. This py file has nothing concerning this map (it contains other things for the ambush and spawning Al) but that is it...

    And there were no chest objects in that folder... weird.

    How did they make the throne object disappear?
     
  9. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    That is weird if there are no chests there.

    As for how its done - well, its a scenery object, so its embedded in the sector: you'll need to open the sector with ToEEWB and extract the object. Definitely do this if you never have: its how you add trees, doors etc to maps.

    As for how they trigger it - open the Golden Orb's py file and look - I don't remember what it says myself.

    EDIT: Ahhh, I know why the map folder is empty -thats the Co8 one that only contains additions. You want the original from the dats :)
     
  10. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    I dont mean to sound ignorant, but how do I adjust those variables in a script? I have never seen it done.

    Woot, 100 posts.
     
  11. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    And I am sorry I have so many questions, but I need to get this done within the next couple days. This is the whole golden orb file (py218) from the dat's.

    Code:
    from toee import *
    
    def san_insert_item( attachee, triggerer ):
    	if ((triggerer.type == obj_t_pc) and (game.global_flags[341] == 0)):
    		game.global_flags[341] = 1
    		game.char_ui_hide()
    		game.fade(2,0,303,0)
    		burne = find_npc_near( triggerer, 8054 )
    		if (burne != OBJ_HANDLE_NULL):
    			triggerer.begin_dialog( burne, 470 )
    	gem = triggerer.item_find(5808)
    	if (gem != OBJ_HANDLE_NULL):
    		triggerer.d20_send_signal(S_Golden_Skull_Combine,gem)
    		gem.destroy()
    	gem = triggerer.item_find(5809)
    	if (gem != OBJ_HANDLE_NULL):
    		triggerer.d20_send_signal(S_Golden_Skull_Combine,gem)
    		gem.destroy()
    	gem = triggerer.item_find(5810)
    	if (gem != OBJ_HANDLE_NULL):
    		triggerer.d20_send_signal(S_Golden_Skull_Combine,gem)
    		gem.destroy()
    	gem = triggerer.item_find(5811)
    	if (gem != OBJ_HANDLE_NULL):
    		triggerer.d20_send_signal(S_Golden_Skull_Combine,gem)
    		gem.destroy()
    	return SKIP_DEFAULT
    
    Flag 341 is the 'Got Golden Orb' Flag, and I am sure the 'game.fade(2,0,303,0)' runs the movie, but nothing seems to change a sector/object/ect...

    EDIT: Furthermore, the embedded objects are protos 2089 (floor dropping) and 2090 (TI Throne) which do not have any py file #'s referenced in their prototypes.
     
    Last edited: Feb 17, 2009
  12. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    You know what, I can do all of this a different way if there is a script that runs whenever a new game is loaded to check a global flag and change the map and sectoring if needed. I just need to edit this script...

    I dont think a first_heartbeat script on the map would work because the map is allready loaded, and it would create problems re-drawing the map.
     
  13. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,001
    Likes Received:
    250
    Did you check the .mobs for the room from the dats? Most likely flag 341 is checked in a script attached to something in the room that turns the throne OFF.
     
  14. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Flags, not variables. Have a look at Allyx's merchants in Verbobonc: I am willing to bet they are done using that method. :) (I don't have ToEE on this PC so I can't be more specific atm).
     
  15. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,001
    Likes Received:
    250
    Here is an example of a flag being set in a script... you posted it ranth.

    def san_insert_item( attachee, triggerer ):
    if ((triggerer.type == obj_t_pc) and (game.global_flags[341] == 0)):
    game.global_flags[341] = 1

    So to explain,the san_insert_item bit means the Proto has to have the script number for this script in the insert item part of it to reference the script.

    If triggerer type...yada yada yada (just grabbing an object I think) and flag is set to 0...

    set the flag to 1.

    IMPORTANT!!! To ckeck the flag status use "==" to set the flag to a different status use "=" screwing that up will cause headaches for hours on end.
     
Our Host!