WB Tutorial Questions

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

Remove all ads!
  1. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,654
    Likes Received:
    352
    Yeah its a big plain square (when lying flat). Very handy. Retextured, its the 'owlbear fight' you see floating past on the KotB startup-screen.
     
  2. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    Ted is there a script command to search for an object all over the map?

    The closest I can find is a vicinity script. I am trying to make a heartbeat script that looks for all the guards in Hommlet. The problem is that the object that runs the script has to be in a set location, and the guards are too spread out to be hit by this game.obj_list_vicinity() function.

    Code:
    def Find_Guards(spawner): 		
    	for obj in game.obj_list_vicinity(spawner.location,OLC_NPC):
    		if (obj.name == 14371): 
    			#Whatever needs to happen
    Do you know of anything that searches the entire map?
     
  3. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,654
    Likes Received:
    352
    No I don't, not off the top of my head. :shrug:
     
  4. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    I am running into another problem (shocking huh?)

    I have been able to write a script that removes Rufus, Burne, the apprentice and guards from the tower after I spawn them in Nulb.

    The problem is that when spawn them in Nulb and my party kills them, I get the Butcher of Hommlet rep (That I am o.k. with). However, if I attempt to enter the Tower after this encounter, Rufus, Burne, Apprentice and guards spawn in the tower (when they are supposed to be gone). If I kill them, their bodies dissapear (I think).

    I think what happens is that they enter combat in the tower when I have the butcher rep before my object can san_heartbeat and delete them. Then when combat is done, they get deleted.

    Any ideas? The only thing I can think of is giving my party Hommlet reputation so that it does not incur the immediate attack, but that takes something away from the roleplaying.
     
  5. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    Also do you know what file controls the ability to rest in an area or not? I noticed that Preston changes a global variable when he sells you the house, but I dont know where that variable is accessed.
     
  6. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    Finally, what hex editor do you use? I am having issues making a new map and I think I am not editing the hex properly (I am using your tutorial, but I must be doing something wrong). When I teleport to the new map, it is all black and I cannot scroll anywhere. Though if I teleport to a new coords on the map, the screen goes to the coords but my characters dont, then if I click on the screen to tell them to run to that point, they eventually run there, but I still can scroll.
     
    Last edited: Jan 29, 2009
  7. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    Is there a command to kill a character? I dont need obj.destroy, I need something that does the death animation and cues the sans_dying (sans_dying is kinda optional)

    Also, is there a list of particle spell effects? I cant seem to get the syntax correct for a couple of them.
     
  8. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,654
    Likes Received:
    352
    Partsys0.tab and partsys1.tab should do it.

    obj.critter_kill_by_effect()

    and I am still working on your earlier questions.
     
  9. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    No rush Ted. My expansion has plenty of work to do so when I get stuck on something for over an hour, I post my question and move on to another section of the adventure. Thanks!
     
  10. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,654
    Likes Received:
    352
    Ok, the script for sleeping in a house is in random_encounter.py, in the area called def can_sleep(): add the map number and the parameters there. To update the little tent to green at exactly the moment you hit those parameters, include game.sleep_status_update() at the appropriate moment (have a look at the innkeeper for how this works).

    The Hex Editor I use is HexEdit from HDD Software - its very basic but does the job. For map-making in general, try Jota's tutorial HERE, its where I learned the basics :)

    Finally, for Rufus and Burne, you really want to be turning them off (or destroying them) from their own first_heartbeat scripts to avoid just such an eventuality.
     
  11. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    Oh I thought first heartbeat only fired off the very first time you ever meet the character. I didn't know it shot off every time they load up. This makes things a lot easier.
     
  12. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    I am looking to make a new weapon with some special properties, but I cannot see how to add them into the game. In the protos.tab I see how to add +3, but what if I want to do something cool like Fragarach's never missing or unlimited AoO? That is not in Fragarach's proto.

    Another weapon question. I have been succesfully editing the IvenSource.mes file for a few days now, but now something is causing a CTD. I have been adding in some of the items I see in protos but not in game (Cape of Hextor, ect). If an item is made in protos, but someone forgot to add a texture or something, will that cause the game to crash, or will the item just not appear in game?
     
    Last edited: Jan 30, 2009
  13. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,654
    Likes Received:
    352
    It'll cause a crash, yah: I found that out the hard way.
     
  14. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    0
    Yea I figured. Do you know how to add special properties ala Fragrach?
     
  15. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,654
    Likes Received:
    352
    Well you add them in the 'bonus' columns 168ff (there are several so you can add lots of bonuses - everyone loves over-powered game-breaking weapons ;)) For Fragarach and Scather, you will see they have 'Fragarach' as their bonus.
     
Our Host!