agb1 Posted December 13, 2016 Share Posted December 13, 2016 If I recall correctly, the "BGSpawn[EE]" mods place new "spawn trap" regions on various area maps and those trigger creature creation via script when the party triggers those spawn traps, i.e., it is a custom area-by-area done-by-hand modification. I think the idea here to increase creature spawns by a fully dynamic method, potentially applying for mod areas / creatures too. Quote Link to comment
lynx Posted December 13, 2016 Share Posted December 13, 2016 Upgrading the spawn groups (both types) doesn't require editing scripts, it's all in the ARE file. Come to think of it, there shouldn't be many trap spawns in general, so I'm puzzled by the approach. Quote Link to comment
agb1 Posted December 13, 2016 Share Posted December 13, 2016 To clarify, I was referring to the "other mods" that subtledoctor was mentioning (BGSpawn/BGSpawnEE), and trying to explain how their implementation is different from the mod being discussed in this thread. Quote Link to comment
lynx Posted December 13, 2016 Share Posted December 13, 2016 Me too. There must be something awesome or awful going on, for the mod to need to read scripts manually character by character. Quote Link to comment
subtledoctor Posted December 13, 2016 Share Posted December 13, 2016 What I'm sayin'. Quote Link to comment
yowave Posted December 13, 2016 Author Share Posted December 13, 2016 @lynx it's not manually it's done for me by WeiDU xD And what so wrong in doing it character by character? I need to interpret the BCS file and duplicate CreateCreature on specific conditions. Do you really think that regex will do it better performance wise? think again, what do you think happens under the hood when you invoke the regexp function... not to mention we are working with a run time interpreted language. and as @abg1 have said, the idea here is that i do it dynamically. My mod changes area spawns, and also script spawns dynamically. @abg1 thanks for the information about AT_NOW and %WEIDU_OS%, i'll test those and update you if it's working as intended, the goal is to make it work seamlessly, so any unistallation of a mod in the installation chain will cause my mod to be reinstalled without breaking it. @subtledoctor do you know what happens when you copy and patch a file? you read it to memory and when you are done patching, only then it gets written to the hard disk. DECOMPILE_TO_BAF will not speed things, in fact it will only slow things, think about what happens under the hood and you'll understand why. Quote Link to comment
lynx Posted December 13, 2016 Share Posted December 13, 2016 Your snippet was reading it 1-by-1, which no sane input implementation would do, since the length is known. How does the dinamicness (dinamicity?) show? It is not obvious how it would be an impediment. Quote Link to comment
agb1 Posted December 13, 2016 Share Posted December 13, 2016 You may want to use AT_UNINSTALL if something other than WeiDU's usual backup-restore behavior is needed when uninstalling. AT_UNINSTALL is like AT_NOW ... except such actions execute only when the tp2 is being processed during an uninstall, and (by default) only after all of the other WeiDU backup-restore operations are done (undo COPY / MOVE / DELETE). Quote Link to comment
Ardanis Posted December 14, 2016 Share Posted December 14, 2016 (edited) I need to interpret the BCS file and duplicate CreateCreature on specific conditions. What are the conditions, btw? It's the most interesting part that you've omitted Because I can't really imagine an automated bullet-proof way to separate quest-related actors from others. Edited December 14, 2016 by Ardanis Quote Link to comment
yowave Posted December 14, 2016 Author Share Posted December 14, 2016 (edited) @lynx If it's sane or not is not relevant to the problem at hand, i think that you miss the key point that you need to read the bcs files line by line and determine if you act on it or not, the speed is huge factor here.Thanks to @abg1 there's no longer a problem , i just need to test that it works well. Edited December 14, 2016 by yowave Quote Link to comment
yowave Posted December 14, 2016 Author Share Posted December 14, 2016 Updated to version 1.1: * Made compatible with WeiDU uninstall @abg1 Ok currently implemented the new approach using AT_NOW and AT_UNINSTALL, it works flawlessly. @everyone I am going to rewrite the custom software in java so it'll be cross platform, unless someone have anything against it. Also thanks for your interest, i hope no one felt bad, i am one that never shy from a good debate, and you all provided a good one! @Ardanis It still needs testing but this is the basic logic behind the decision if to duplicate an actor or not: 1. if it have an existing dialogue file 2. it's allegiance 3. biography 4. if it's have a script (not ai script), candle keep rats comes to mind. I am not checking for quest items, cause i think it doesn't matter if you've got 2 quest items. Do you think it can cause a problem down the line? if so i'll fix it. Quote Link to comment
Ardanis Posted December 14, 2016 Share Posted December 14, 2016 I am not checking for quest items, cause i think it doesn't matter if you've got 2 quest items. Do you think it can cause a problem down the line? if so i'll fix it. There may be death variable checks, that can interfere with SoD's scripting if the actors get duplicated. I think most should get filtered out by the checks you mentioned, though... If you want to be on a safe side, then read scripts/dialogs for a list of Dead(), NumDead**(), Global**("SPRITE_IS_DEADxxxx",) etc. names and exclude actors with DVs from the list. Also note that embedded actors may have their scripting name/DV overriden by the bit 3 flag, so it's usually a good idea to not clone those either. Quote Link to comment
yowave Posted December 14, 2016 Author Share Posted December 14, 2016 @Ardanis thanks for the heads up. I think that the script that i change takes care of the sprite_is_dead, you can look at the rats from candle keep, if you change it to none you get SPRITE_IS_DEADNONE. About Dead() and NumDead(), are those found in the creatures ai scripts? or is it something that have logic behind it and the developers put it in some known script for such things? About quest items, i can just remove those from creatures that should get duplicated, though i don't think that it can cause a problem. I really like this mod and use it myself, it makes the game hard without gimping the user, so one can still use whatever in their disposal, cheese or otherwise to tackle THE HORDE Thing is, right now you get double the exp (more creatures), should i lower the duplicated creatures xp values, if so by how much? one need to be rewarded but without breaking the game too much. What do you think about lowering the duplicated creatures xp by 75%?\ Someone will be interested if i'll give the ability to duplicate any hostile enemy even plot ones (maybe it'll be an overkill, think about SCS firekragg or Irenicus, OH BOY)? i can make it work by removing their dialogue and scripts (not ai scripts), maybe also prying their other scripts for actions that might break their behavior. Quote Link to comment
agb1 Posted December 14, 2016 Share Posted December 14, 2016 (edited) I can see merit in two different approaches for XP: 1) Leave it alone - plenty of other tweak mods provide a full range of % customization 2) Adjust it so the total XP is the same as if you weren't using the mod (giving zero XP for killing the clones would probably be the easiest way to do this) I would also consider making the clones' inventory items non-droppable so THE HORDE doesn't flood the party with even more drops. That could be optional too. Edited December 14, 2016 by agb1 Quote Link to comment
Ardanis Posted December 14, 2016 Share Posted December 14, 2016 About Dead() and NumDead(), are those found in the creatures ai scripts? or is it something that have logic behind it and the developers put it in some known script for such things? Can be found in any script or dialog, so it's better to compile a list of quest actors first, then refer to it. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.