Cerulean the Blue's Modding Frenzy

Discussion in 'General Modification' started by Cerulean the Blue, Apr 6, 2006.

Remove all ads!
  1. Ugignadl

    Ugignadl Established Member

    Joined:
    Apr 4, 2006
    Messages:
    175
    Likes Received:
    0
    Re: Reattaching Shop Inventories to Adventuring Shopkeepers

    Otis now working, and reattaching beautifully.

    Does this mean it was a success???
     
  2. Cerulean the Blue

    Cerulean the Blue Blue Meanie Veteran

    Joined:
    Apr 23, 2005
    Messages:
    1,962
    Likes Received:
    0
    Re: Reattaching Shop Inventories to Adventuring Shopkeepers

    I think it does. Baring any other reports of problems, I'm calling this mod finished. Thank for all your help, everyone! :D
     
  3. Cerulean the Blue

    Cerulean the Blue Blue Meanie Veteran

    Joined:
    Apr 23, 2005
    Messages:
    1,962
    Likes Received:
    0
    I'm going to re-use this thread rather than start another one. To more fixes to test, all you of the Legion.

    The first is simple. I've fixed Paida. Now she does not return to the Temple once you have freed her. I've also fixed some minor dialog glitches dealing with the Desperate Housewives quest. The flags for this fix are as follows:

    game.quests[98].state = 2 (DH quest accepted)
    game.global_flags[148] (Paida's charm dispelled)
    game.global_flags[149] (Paida not escorted out of the Temple)
    game.global_flags[38] (Paida escorted back to Hommlet)

    The second fix is the Random Encounter Encampment that Shiningted thought up and did the art for. The scripting is all mine. You need to have a lot of random encounters to test this one. And I do mean a lot. What I'm looking for is where your party shows up on the camp encounter map, and any odd behavior of the enemies in any of the random encounters. And, of course, what you think of the idea. No flags or variables for this one.

    If you are using Front End, you are going to have to cut and paste some. If you are not using Front End, you can just unzip it into you ToEE root directory. Here are the files.
     

    Attached Files:

    Last edited: Apr 23, 2006
  4. Cerulean the Blue

    Cerulean the Blue Blue Meanie Veteran

    Joined:
    Apr 23, 2005
    Messages:
    1,962
    Likes Received:
    0
    Next addition:

    Changes to the ShopMap.

    I've added a greeter. Make sure you try attacking the merchants.

    Same install procedures as the rest. And I keep forgetting to mention this: Delete all the .pyc files in your scr folder. This applies to every mod in this thread.

    You can download the files here.
     
    Last edited: Apr 23, 2006
  5. Lord_Spike

    Lord_Spike Senior Member Veteran

    Joined:
    Mar 25, 2005
    Messages:
    3,151
    Likes Received:
    1
    The Legion is on the march....
     
    Last edited: Apr 23, 2006
  6. Cerulean the Blue

    Cerulean the Blue Blue Meanie Veteran

    Joined:
    Apr 23, 2005
    Messages:
    1,962
    Likes Received:
    0
    Re: The Random Encounter Encampment

    You will need an average party level of at least 6 to even get the new encounter. I recommend characters of above that level. Random encounters in this game are level Dependant, at least until you hit about 8th level.
     
  7. rufnredde

    rufnredde Established Member Veteran

    Joined:
    Apr 8, 2006
    Messages:
    266
    Likes Received:
    1
    Random Encounter Testing

    I started at level 5, no matter, I am now at level 7.5 and have not run into the new map yet. I will update this thread with new imformation as soon as I get something.
    This should be easy I had a random encounter with a skunk last night while walking my dog so random encounters it is
     
  8. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    I had a number of random encounters with possums or rats or heaven-knows-what lurking in the undergrowth in a city park tonight... lucky my survival skills are high.
    I feel I have gotta say somehing about this, because I never do it yet never have any problems that can't be explained some other way, and (usually) get my .py file hacks working, but ALWAYS without having to delete the .pyc file to 'force' a recompile.

    I hypothesise that if people are having issues where a .py hack is not kicking in, then it has to do with the save they are using: perhaps they are saving next to an NPC, changing that NPC's .py file then loading the save. This may well caus things not to fire.

    The answer is not so much deleting the .pyc as get into the habit of saving on a seperate map to changes and ALWAYS use a save from another map. This can be inconvenient (certainly was when I was hacking up Prince Thrommel and had to make my way back to him from the 4th lvl stairs to test every little thing) but is important not just for .py files but for most other changes on the map, eg new .mobs, changed .sec files etc any and all of which may be found in any given Co8 release.

    Ergo, its a good habit to get in and u never have to worry if you've deleted your .pyc files or not.
     
  9. rufnredde

    rufnredde Established Member Veteran

    Joined:
    Apr 8, 2006
    Messages:
    266
    Likes Received:
    1
    I agree with the saving tactics, and I already do some of them and plan to add a few more of them to my habits

    but it does bring up one question. If things are as they appear the pyc's compile when you use them not when you save

    at the first use the .py (python file) is compiled into a .pyc (compiled python file)
    and the program has to read the .pyc file it can't read raw code so it has to be compiled into machine language

    and a .pyc already exists with the same name as the one you are modding
    example burne0004.py compiles into burne0004.pyc

    then if you make any changes in the .py file you must delete the corresponding .pyc for the changes to be compiled and be usable.

    True you don't have to delete any unmodified pyc's but is just as easy to delete them all a fresh compile never hurt anything.

    If it is an entirerly new file name then you don't have to delete anything.
     
    Last edited: Apr 23, 2006
  10. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    Yeah but what I am saying is I don't do it, and the py files seem to recompile anyways. Which suggests either they recompile on a map change, or just when u start the game. I don't know when it is, but unless u r running the game in a window and making file changes without restarting the game (which some people may well be doing but I never do and should think would be problematic when modding) its automatically happening.

    I'm not saying don't delete your .pyc files, but lets not start advertising this as a panacea for problems. People coming to the site asking questions should NOT be advised "delete your .pyc files", its a complication to folk who struggle enough as it is and if our mods don't suit certain situations, well people should be told straight up "you have to start a new game", not "u have to delete these files and you have to avoid saving on these maps and you have to do blah blah blah". Thats fine for us modders but not the ordinary folk who download our efforts in large numbers and just want something easy to run.

    [EDIT] If people are having this problem because they mod in a wondow, can they let us know?

    [2nd EDIT] Actually, yes they do compile when u use them <smacks forehead>. Which begs the question, can anyone honestly say they had a problem that was solved purely by deleting the .pyc file and nothing else?
     
    Last edited: Apr 23, 2006
  11. Ugignadl

    Ugignadl Established Member

    Joined:
    Apr 4, 2006
    Messages:
    175
    Likes Received:
    0
    Earlier in this thread I assumed that solved my problem, as I tried it and everything worked.

    However one or several other things also could have made the mod I was testing start to work. Maybe restarting TOEE, saving on a different map, ...

    Or it could have been the .pyc deletion. Who can tell? :confused: :shrug: :blahblah:
     
  12. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    I tried editing script files while the game is running, it didn't make any difference until I restarted, so I guess the entire script library (*.py) is loaded when the game loads, and is held in memory? (not 100% sure about that part) and only refreshed when loading the game the next time.
    I can't say I have, but then I try to avoid scripting as much as possible, that said I always delete all .pyc files and map cache files before uploading a new version of the Verbo-mod, but that's more to cut the file size down a bit than to prevent problems.
     
  13. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    Thanks Ug but actually Rufnredde and I have decided to do a quick bit of testing to get to the bottom of this. Stay tuned for results.

    EDIT: u too Al ;)
     
  14. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    I hope you don't mind ol' blue one, I had to re-number your dlg, scr and the proto references to them to avoid a conflict with my Verbo-mod (I used number 379 instead of 339). I'll take a look at the changes and post my feedback shortly.
     
  15. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    Ok, back from a kwik test:

    I added a KOS command to Calmert's heartbeat file and loaded a save standing next to him (without deleting the .pyc). I've got pix, but couldn't b bothered photoshopping them: suffice it to say he went me the instant the screen loaded (complete with summoning Terjon). Sooooooo even on the same-map save, he still compiled the NEW .py file.

    I then transfered the KOS command to the first_heartbeat file and reloaded the 'next to him' save. This time he stood around placidly: the first_heartbeat hadn't fired, BUT the normal heartbeat had clearly been recompiled WITHOUT the KOS command that would have been in the previous compile.

    I walked outside, walked back in, the first_heartbeat fired and Calmert (and Terjon) attacked me. So the file worked ;)

    We know that first_heartbeat doesn't work too well with autosaves. I would suggest they simply don't fire when u load a save, but only on map changes.

    I don't think it has anything to do with the pyc file. Guess I shoulda tested a first_heartbeat change with the .pyc deleted ;)
     
Our Host!