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:
    1
    I did not. I took that line from the ed.py or utilities.py file which defined the in_vicinity_of function which used that line to find the location. The whole function I am writing is as follows:
    Code:
    def san_first_heartbeat( attachee, triggerer ):
    	if( (game.global_flags[503] == 1) or (game.global_flags[517] == 1)):
    		loc = location_to_axis(attachee) #Get Location of NPC
    			if( game.global_flags[503] == 1): 
    				attachee.destroy() #Destroy NPC
    				newnpc = game.obj_create(14074,loc) #Load New NPC
    				
    	return RUN_DEFAULT
    When the NPC loads, it is supposed to check the flags, and if flag 503 is true (1) it would destroy the NPC and replace it with another in same location.
     
  2. GuardianAngel82

    GuardianAngel82 Senior Member

    Joined:
    Oct 3, 2007
    Messages:
    3,481
    Likes Received:
    5
    Then what I suggested would be of no use. It simply tells you, during, the game what your lead character's location is on the map. I used it to relocate npc's to a new location on the map in a mod by Sitra Achara. Sorry, I don't know more. I've been following this thread with interest since you started it. I'm dying to see how it turns out. :thumbsup:
     
  3. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,746
    Likes Received:
    375
    You want

    loc = location_to_axis(attachee.location)

    as for the other: hmmm... I dunno. Firstly check your paths: is your ToEEWB folder set up properly? You will see at the beginning of ed.py the line

    PATH_TO_SECTORS = """C:\ToEEWB_2.0\Sectors"""

    Or something similar (thats how mine is set up). If your ToEEWB folder is named differently - on a different drive than C, or in C:/Program Files/ToEEWB 2.0, or whatever, then you have to edit this path in ed.py accordingly.

    Alternately, maybe your ed.py is corrupt somehow. :shrug:

    To change the .sec files there have to be copies of them in ToEEWB/Sectors. Those get changed when you do the sectoring: copy them back to them game map folder to see them in action (and clear the map cache).
     
  4. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Ted, you were right the ed.py file was pointing to the wrong sector folder, is there anything you dont know? haha.

    GuardianAngel82, thanks for the support. If I finish the expansion it will be epic, which means either people will love it or hate it. I am hoping love, because I love it, but who knows :)
     
  5. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    More sectoring problems yay!

    I was able to get the sectoring/paint thing to work. It made a file which I edited in WB to define my walls better. However, when I copied and pasted the file into the maps folder for the map and load the game, the new sectoring is not occurring, I can run over my impassable areas. Things to note:

    1) I have 'Clean Game Cache On Startup' Enabled in TFE to clear the old sector data (and load my new sectoring).
    2) I was forced to rename the sector file WB made because it had the same name as an existing file in the folder (I kept the old sector files since I am modifying an existing map). Is there a file that lists all the sector files for a map to load and I would need to add my new filename to that file?

    Any ideas?
     
  6. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,746
    Likes Received:
    375
    Eeek! Rename it? :nervous:

    As I said in the previous post, you copy the .sec files into the Sectors folder (ToEEWB_2.0/Sectors), modify them with WB or in-game painting, then copy them back into the game's map folder over the existing ones (which you will of course have backed up :)) Same as modifyng protos.tab or anyother file: you make your changes and put it back in.
     
  7. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Right right, I just thought that would not work because there were already sectored files... but I shall do as you say Ted.

    Also, I am still continually running into the 'black map' problem when trying to make my own maps. I am making an entirely new map following your and Jota's instructions but it comes up black. I used the Verbononc map as a template since it would be roughly the same size, edit all of the files (including hex edit Map.prp), split my JPG map (with the renamed text file from recombining Verbononc so the JPG's are not named 00001, 0002 ect) but nothing ever seems to work.

    Everything is in the map except the background, so I know I have copied it all correctly, it just does not read my new background jpg's... If I copy all of the art/ground Verbononc files over from the original folder to my new art/ground folder the background is still black. I am lost.

    Update: Not sure if this helps the debug, but I deleted all of the SEC and MOB files and tried running around the map. The guards are gone, but I can still 'see' the shadows of walls and lightposts when my 'go here' blue circle is placed under/on them.

    Solved: I did not know that the dimensions of the new map had to match the dimensions of the base map (Verbononc). What I did was open the Verb map in Photoshop, and open my map in a new file. I selected my whole map, copied, and pasted it as a new layer above the Verb map. Then I blacked out the Verb map underneath it, saved as a JPG, split, and it worked. I am noticing that my characters are going 'under' the map (like behind a wall) but I am sure I can figure that out now. WOOHOO!
     

    Attached Files:

    Last edited: Feb 4, 2009
  8. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,746
    Likes Received:
    375
    Thats because the Verbo-mod maps are original ToEE and include clipping files for when you walk behind columns, etc. We can't replicate those in WB and you will have to just delete those files, if you plan on altering original maps so you can go such places.
     
  9. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Is there a console command to see the status of a global flag or variable? Certain things are not occurring when they are supposed to and I am wondering if my saved game has the correct flags active.
     
  10. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,746
    Likes Received:
    375
    Just the usual ones:

    game.global_flags[#]

    That will return the value of the flag (0 or 1)

    game.global_vars[#]

    Ditto the variable. Or

    game.global_flags[#] = 1

    will set the flag.
     
  11. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    After a weekend trip to visit a friend (which got me back into World of Warcraft, oh the addiction) I am back and ready to keep modding. I cannot seem to find a tutorial on how to add an area to the world map.

    I know we are limited to 7 icons and I dont plan on playing with them, jus to add my areas to the list, but how do I do that? Is it a simple game.area[18] = 1 and define the worldmap coordinates?
     
  12. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,746
    Likes Received:
    375
    :blink:

    Re my tutorial on worldmap areas, you may remember me saying that to get new worldmap areas Spellslinger had to hack them into the .dll.

    Now, he added several (which show up in the docs somewhere as 'placeholder'). But I don't know that he associated those extra ones with any specific map. So I am not sure how you would go about introducing new areas.
     
  13. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Hack the Dll? Doh! Oh well, I guess it is easier just to send people to new places via dialogue anyway.
     
  14. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    255
    Search for the Worldmapper tool by spellslinger to add new worldmap locations and if you plan on adding worldmap paths, also search for the pathmapper tool by hazelnut. I've used both, the pathmapper is wonderful, the worldmapper is difficult to understand and use, but read the docs, it explains everything.
     
  15. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    In the interest of fairness and full disclosure, I should state that I'm not real keen on adding new list-only, icon-less locations (for the Co8 modpack anyway) after having gone to all the trouble of reorganizing the existing ones in 5.5. That was meant to be a 'final stamp' type maneuver.

    I could never get Hazelnut's pathing tool to work btw, which meant a horrible business of doing all that stuff by hand. I strongly suggest you avoid it unless you're willing to commit endless tedious hours to working on it.
     
Our Host!