Feature Request: conditional COPY_EXISTING
#1 -jcompton-
Posted 24 July 2002 - 10:18 PM
We want to give Anomen dream-script material in TOB. PDIALOG.2DA defines ANOME25D.bcs, but it does not actually exist in-game. (It's not even a stub, it's just flat-out not there.)
So here's the situation: We can, of course, copy in a new one, but then if someone else comes along and does the same thing...blah.
FORBID/REQUIRE_FILE WOULD get us around the problem, but that's not very user-friendly. "Install Kelsey TOB V1 (Pick this one if you're pretty sure that nobody else has come along and made major changes to Anomen.)" ... eh.
Soooooo... how about some sort of conditional COPY_EXISTING that allows us to say "Okay. If this .bcs exists, we would like to COPY_EXISTING it. If it doesn't exist, please copy in our new version."
#2 -jcompton-
Posted 24 July 2002 - 10:23 PM
We'd like to do this:
If ANOME25D.bcs exists, we want to EXTEND_BOTTOM it.
If it doesn't, we'd like to COPY ours over.
Thoughts?
#3
Posted 25 July 2002 - 11:21 AM
My actual example:
SPfixpack (WeiDU form) is NOT compatible with Baldurdash's fixpack, because Baldurdash already cleared things from hex point of view, so WeiDU will simply drop out of installation with an error if someone tries to delete erroneous part of an bugged item that Baldurdash already made.
#4
Posted 25 July 2002 - 01:50 PM
Sorry to hijack your thread jc, but since I see Extremist posting on here I might as well ask him now.I absolutely support this request. This way we could set a new compatibility solutions in cases where our mod would kill another one or we could totally reject installations of certain modified files (items) that exist in previous mod(s).
My actual example:
SPfixpack (WeiDU form) is NOT compatible with Baldurdash's fixpack, because Baldurdash already cleared things from hex point of view, so WeiDU will simply drop out of installation with an error if someone tries to delete erroneous part of an bugged item that Baldurdash already made.
I've being working on combing all the Baldurdash fixes/cheats into WeiDU form as well Exremist. I have everything done except the SOA bugfixes, and well, since you've done that already, I'm wondering if you mind if I add it to my installer as well. I'll give you full credit for it of course, and you can even check my work thus far if you want.
Yes/no?
#5
Posted 26 July 2002 - 01:33 PM
My solutions are mostly different than his ones.
And trust me, my solutions are not nor can be compatible with his works.
And as I've already said number of times, I don't want to have anything with cheats/tweaks unless the pack is called CHEAT or TWEAK with big letters, regardless what Wes says.
[EDIT]
If I see it right, you think that I've transformed Baldurdash's bugfixes into WeiDU format. If you think that, you're wrong. All and I mean ALL fixes I wrote by myself - from the scratch. Some of the fixes will be the same of course, but you can't make a different fix when it's about removing some effect from an item, right?
Anyway, not a single fix in my fixpack is from Baldurdash's fixpack.
#6
Posted 01 August 2002 - 09:10 PM
I can add:Actually, I didn't explain the scenario quite right.
We'd like to do this:
If ANOME25D.bcs exists, we want to EXTEND_BOTTOM it.
If it doesn't, we'd like to COPY ours over.
Thoughts?
IF predicate THEN tp2_actions [ ELSE tp2_actions ] ENDIF
as a tp2 action. So you could say:
IF this-file-exists THEN EXTEND_BOTTOM blah ELSE COPY blah2 ENDIF
This will take about 10 minutes (== very simple).
Please list all predicates you think you would like (I can add more later, but a good seed set). For example, "file exists" "file size is >= X" "file contains string Y".
#7 -jcompton-
Posted 01 August 2002 - 09:24 PM
Ah. I'd been wondering for a while why .tp2 didn't have if/then/else but I also couldn't think of any real reason to need it so I kept my mouth shut.I can add:
IF predicate THEN tp2_actions [ ELSE tp2_actions ] ENDIF
We'll work up a list. Thanks.
#8 -jcompton-
Posted 02 August 2002 - 07:26 PM
...maybe some other time, since 62 is already out.We'll work up a list. Thanks.
Thanks. Sorry we weren't faster, Ghrey and I haven't really hooked up since the window of opportunity opened.
#9
Posted 02 August 2002 - 08:02 PM
Not at all. You are one my few, proud, "valued users". :-) You are certainly not beholden to me to exhibit any sort of celerity. Just let me know if it works.Sorry we weren't fasterWe'll work up a list. Thanks.
#10 -Ghreyfain-
Posted 03 August 2002 - 09:32 PM
A few places where improvements could be made, which I'll list at the end of this post. First; the code that actually worked.
ACTION_IF // Start an IF/THEN/ELSE statement
FILE_EXISTS ~override\anome25d.bcs~ // Doesn't work with just ~anome25d.bcs~, so if it's hidden in a .bif it won't work.
THEN BEGIN
EXTEND_BOTTOM ~anome25d.bcs~ ~kelseytob\scripts\j#ano25d.bcs~ // Added a fake little script, and it appended fine.
END
ELSE BEGIN
COPY ~KelseyToB\Scripts\J#Ano25D.bcs~ ~override\ANOME25D.bcs~ // When the fake script was gone, the entire script was copied.
END
So there you go. As for the room for improvements, see above comment about not checking .bif's. I don't suppose it's likely, but if someone puts out a mod that--*ahem!*--has a chitin.key and new .BIFs we'll want to be able to look for them.
Thanks Wes.
#11
Posted 04 August 2002 - 09:22 AM
Just dropping by to report success.
Great!
So there you go. As for the room for improvements, see above comment about not checking .bif's. I don't suppose it's likely, but if someone puts out a mod that--*ahem!*--has a chitin.key and new .BIFs we'll want to be able to look for them.
I'm not clear on exactly what power you want here. Are you looking for a new predicate? If so, when should it be true and when should it be false?
#12 -jcompton-
Posted 04 August 2002 - 12:48 PM
I believe he wants FILE_EXISTS to be able to look both in the designated directory (override, in this case), and through the BIFFs listed in chitin.key.I'm not clear on exactly what power you want here. Are you looking for a new predicate? If so, when should it be true and when should it be false?
#13
Posted 04 August 2002 - 02:11 PM
I will include that predicate in the next weidu release.I believe he wants FILE_EXISTS to be able to look both in the designated directory (override, in this case), and through the BIFFs listed in chitin.key.I'm not clear on exactly what power you want here. Are you looking for a new predicate? If so, when should it be true and when should it be false?