Miloch Posted January 7, 2007 Author Share Posted January 7, 2007 Thanks for the answers. One more question (for now). Would this syntax work to make a CRE dual wield two weapons? COPY ~TESTCRE.CRE~ ~override/TESTCRE.CRE~ REPLACE_CRE_ITEM ~SW1H04~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP REPLACE_CRE_ITEM ~SW1H04~ #0 #0 #0 ~NONE~ ~SHIELD~ EQUIP Also (ok two questions I guess), is case-sensitivity for this sort of code an issue for Macs? I've had one report that it isn't... not sure if it makes a difference if I'm copying my own ITMs/CREs over and they're lowercase for example (as they tend to be when creating things with an editor like DLTCEP). Link to comment
berelinde Posted January 7, 2007 Share Posted January 7, 2007 You won't need the EQUIP after the SHIELD. You only need to equip a weapon in a weapon slot. In shield slot, it'll be there already. Link to comment
Miloch Posted January 7, 2007 Author Share Posted January 7, 2007 You only need to equip a weapon in a weapon slot. In shield slot, it'll be there already.Yeah but it's not a shield, it's a weapon. If I don't equip it, will it still be effectively dual wielded? Link to comment
pro5 Posted January 7, 2007 Share Posted January 7, 2007 EQUIP is used to set the "selected weapon slot" field in CRE file, it only has effect with WEAPON1-WEAPON4. Link to comment
devSin Posted January 7, 2007 Share Posted January 7, 2007 You won't run into any case-sensitivity issues here. TESTCRE.CRE is equivalent to TestCre.CRE is equivalent to TestcrE.cre is equivalent to testcre.cre... I think it matters on Linux, but who cares? I standardized on all uppercase (for everything) for some reason. I'd normally abhor it, but it just seemed right for BG. Link to comment
cmorgan Posted January 8, 2007 Share Posted January 8, 2007 Ditto on the uppercase standardization, except for Tutu dvs, which I standardized on all lowercase. I think it was reading the decompiled D and BAF files that made me think this way (though I don't know if it was DLTCEP or NI or WeiDU decompiling...) Link to comment
berelinde Posted January 8, 2007 Share Posted January 8, 2007 DV's *are* case sensitive, I think, aren't they? Link to comment
devSin Posted January 8, 2007 Share Posted January 8, 2007 No. String comparison within the engine isn't ever case sensitive (not even CharName() checks). (Since I brought it up, CharName() is one trigger (the only one?) that accepts and respects whitespace ("FOOBAR" won't match "Foo Bar" and so on)). As far as script names, the easiest to read is probably "truecase" (e.g., FunkyMonkey instead of FUNKYMONKEY or funkymonkey or whatever). I do all uppercase here too, but the script names I assign will almost always match the resref. Every string in every script and dialogue I touch is all uppercase too. There's no excuse for sitting on the fence. Link to comment
berelinde Posted January 8, 2007 Share Posted January 8, 2007 Well, that's certainly useful to know. Thanks! Link to comment
pro5 Posted January 8, 2007 Share Posted January 8, 2007 At least REPLACE_ACTION/TRIGGER_TEXT are case sensitive, unless my memory plays tricks with me. Otherwise I don't understand why certain dialogs were left unchanged until I made cases match. Link to comment
devSin Posted January 8, 2007 Share Posted January 8, 2007 WeiDU has its own rules and is undoubtedly inconsistent. The game engine doesn't suffer similarly; you can See("Imoen") or See("IMOEN") or See("imoen") or See("iMoEn") -- all will behave identically. Link to comment
cmorgan Posted January 8, 2007 Share Posted January 8, 2007 I have picked up on/started using pro5's use of REPLACE_TEXTUALLY CASE_INSENSITIVE because of the oddities of patching - I think that The Bigg has also mentioned that WeiDU is definitely inconsistent in the use of uppercase/lowercase/case sensitivity. He has also mentioned the Linux need to have everything lowercase, but has a small program to set everything lowercase. I have also moved as much scripting and dv to C_E --- %DEST_RES% or %SOURCE_RES% (I think that is right) as possible, with minor variations for tra reference clarity. It certainly makes it harder to do silly things like accidentally mispelling or misusing .cre resource name vs dv. Very useful to know about the whitespace thing - I had not thought about that! Link to comment
Miloch Posted January 13, 2007 Author Share Posted January 13, 2007 I'm putting the final touches on tweaking some rather shoddily-coded Bioware CREs. Several mages and mage-like CREs in the game don't have any spells. So I'm trying to give them a few. Does ADD_KNOWN_SPELL also make the CRE memorize the spell (in addition to making it available) or is other code necessary? Do you have to also increase the number of spells memorizable for the spell level, or does ADD_KNOWN_SPELL augment it automatically? Would you stack ADD_KNOWN_SPELL commands successively to memorize several instances of the same spell? Is BUT_ONLY_IF_IT_CHANGES cumulative both ways? For example, on one hand, I'm copying several CREs and making the same change to them all (let's say it's an ADD_KNOWN_SPELL). So does the ADD and the BUT_ONLY cover all the COPYs or just the last one? Finally, is there some sort of difference comparison tool for IE files (CREs, ITMs, etc.) a la WinDiff? If not, would there be interest in one? Not that I have the skills to produce one necessarily, but I'm surprised there isn't one already in something like NI or DLTCEP (maybe there is and I've just missed it). Link to comment
Nythrun Posted January 13, 2007 Share Posted January 13, 2007 I'm putting the final touches on tweaking some rather shoddily-coded Bioware CREs. Several mages and mage-like CREs in the game don't have any spells. So I'm trying to give them a few. That's pretty common; Bioware mages tend to cast everything from script and often skip the HaveSpell() triggers needed to make the spellbooks matter. Does ADD_KNOWN_SPELL also make the CRE memorize the spell (in addition to making it available) or is other code necessary? Do you have to also increase the number of spells memorizable for the spell level, or does ADD_KNOWN_SPELL augment it automatically? ADD_KNOWN_SPELL only adds to the spellbook and doesn't affect or check memorization. The game also only checks allowable known spells per level when a party member reads from a scroll, so it doesn't matter there either. Is BUT_ONLY_IF_IT_CHANGES cumulative both ways? For example, on one hand, I'm copying several CREs and making the same change to them all (let's say it's an ADD_KNOWN_SPELL). So does the ADD and the BUT_ONLY cover all the COPYs or just the last one? BUT_ONLY will work on all of the COPY commands; however, if you're just inserting new information into a file without checking to see if it's already there, BUT_ONLY can't do anything. I don't know if ADD_KNOWN_SPELL has a redundancy check built in (not that having dupes in the spellbook harms anything, there's a few Bioware creatures who already do). Finally, is there some sort of difference comparison tool for IE files (CREs, ITMs, etc.) a la WinDiff? Not that I'm aware of - it sounds like a limited audience kind of project though Link to comment
Miloch Posted January 13, 2007 Author Share Posted January 13, 2007 I'm putting the final touches on tweaking some rather shoddily-coded Bioware CREs. Several mages and mage-like CREs in the game don't have any spells. So I'm trying to give them a few.That's pretty common; Bioware mages tend to cast everything from script and often skip the HaveSpell() triggers needed to make the spellbooks matter.I suspected that at first, but a lot of these CREs appear to lack scripts also (decent spellcasting ones anyway). Or some of them have a couple of spells memorized but would be better served by different or additional ones. Is there an easy way to give them a few extra memorized spells, or would I have to resort to mucking about with scripts? That seems a clunky and somewhat unrealistic way (in a PnP sense anyhow) to manage spellcasting. There's an ADD_KNOWN_SPELL and a REMOVE_KNOWN_SPELL and a REMOVE_MEMORIZED_SPELL in WeiDU. Why not an ADD_MEMORIZED_SPELL? Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.