Pocket Plane Group
Friends and Neighbors => Weimer Republic (WeiDU.org) => WeiDU => Topic started by: Miloch on October 08, 2009, 02:25:16 AM
-
For some reason, this doesn't work (seems to enter the largest integer possible for the offset instead). Could've sworn it used to, or at least Nythrun seemed to think so (has it in her macros).
-
Is there any reason (except for expecting WeiDU to actually be consistent) why you can't WRITE_LONG OFFSET (0 - 1)?
-
Yep, have run into the same thing few days earlier while testing my new library.
You can also use ~-1~.
-
Is there any reason (except for expecting WeiDU to actually be consistent) why you can't WRITE_LONG OFFSET (0 - 1)?
No, I thought the SAY actually worked at one point though. And maybe I expected WeiDU to be consistent. What *was* I thinking?!
-
Now for the non-jerk reply. The code behind SAY is the same between 185 and 211. The problem is that
http://upload.wikimedia.org/wikipedia/commons/e/ee/Beet5mov1bars1to5.ogg (http://upload.wikimedia.org/wikipedia/commons/e/ee/Beet5mov1bars1to5.ogg)
standard integers in OCaml are 31 bit signed integers, rather than 32 bit signed. Apparently different versions of OCaml differ in how they hande negative numbers and bitwise operation. I've forced the 'save integer to string' code to always use 32 bit integers (which are available but well-hidden), which fixed the problem.
-
*perfect* clip *)
-
Actually, Beethoven's 5th symphony isn't nearly ominous enough to introduce the idea of 31 bit integers, but I couldn't think of anything better.
-
You could try movie soundtracks from "Jaws", "The Shining", or perhaps even "The Twilight Zone" :D
-
Perhaps the Geto Boys' timeless classic "Still" (the theme played during the printer/fax machine baseball-bat-bashing in the movie "Office Space").
-
I think this nice little Bambi music (http://www.youtube.com/watch?v=BTpa9j60Npg) would also be appropriate.
-
Nythrun seemed to think so (has it in her macros).
I never. SAY is solely for adding new strings, and has been since the .tp2/.d grammar split :)
-
Nythrun seemed to think so (has it in her macros).
I never. SAY is solely for adding new strings, and has been since the .tp2/.d grammar split
I dunno, maybe it was something Yovaneth added then. I think I was working with a version of this code (http://forums.gibberlings3.net/index.php?s=&showtopic=9157&view=findpost&p=76429) which, no, does not seem to have that syntax in its original form.
Speaking of which, do we have a macro that does this yet (adds an animation entry to an area) maybe in the last batch added? If not, is it something we can macroise/functionise?
-
Since I'm the usual lazy asshole I'm not going to code macros for handling ARE files, but if you code (and test) them up I have no problems with adding them to 214.
-
Sorry, late to the party, but either Smoketest or devSin taught me back in the day
WRITE_LONG INITIAL_MEETING (BNOT 0x0) // BLANKING SOUNDS
as a fancier looking code-guru-like way of doing it.
-
(BNOT 0x0)... fancier looking...
"Fancier looking"? Like the bigg said... pass the bong.
Why wouldn't you just use (0 - 1) or ~-1~ if you want to set them to -1, which it appears you want to do?
-
BNOT 0 is a cool trick if you don't know 2-complement notation :D
-
yawn
-
« Last Edit: Today at 07:58:12 PM by devSin »
:D
<3 devSin
-
As a working musician, I know lots of notation, but don't get "complements"... (that is a pun, or feeble wordplay humor, for you ESL folks!)
-
Speaking of which, do we have a macro that does this yet (adds an animation entry to an area) maybe in the last batch added? If not, is it something we can macroise/functionise?
// writing macro, can later be used for other ADD_STUFF functions
DEFINE_PATCH_MACRO wpt_wo BEGIN
LPM ~wpt_lo_%ext%_%obj%~
PHP_EACH $wpt_lo("%ext%""%obj%""nam") AS ind => res BEGIN
PATCH_IF VARIABLE_IS_SET res BEGIN
len=$wpt_lo("%ext%""%obj%""len""%ind%")
off=$wpt_lo("%ext%""%obj%""off""%ind%")+offset
PATCH_IF len=1 BEGIN WRITE_BYTE off EVAL ~%res%~ END
PATCH_IF len=2 BEGIN WRITE_SHORT off EVAL ~%res%~ END
PATCH_IF len=4 BEGIN WRITE_LONG off EVAL ~%res%~ END
PATCH_IF (len!=1)&(len!=2)&(len!=4) BEGIN WRITE_ASCIIE off EVAL ~%%res%%~ (len) END
END
END
END
// loading offsets
DEFINE_PATCH_MACRO wpt_lo_are_anima BEGIN
DEFINE_ARRAY wpt_lo_are_anima_nam BEGIN name position_X position_Y schedule bam_source flags position_Z loop END
DEFINE_ARRAY wpt_lo_are_anima_off BEGIN 0x0 0x20 0x22 0x24 0x28 0x34 0x38 0x3e END
DEFINE_ARRAY wpt_lo_are_anima_len BEGIN 32 2 2 4 8 4 2 1 END
END
// launcher itself
DEFINE_PATCH_FUNCTION add_area_animation
INT_VAR
flags=1+4
schedule=`0
loop=100
BEGIN
LPM wapt_Q_ARE_InitVars //launch variable initiation macro
LPM wapt_Q_AREAdd_InitVars //launch variable initiation macro for adding new sections
Q_New_Anima=1
LPM wapt_Q_AREAdd_Process //launch macro that adds new space for above listed entries
offset=Q_NewOffset_Anima // from where we'll do writing
SPRINT ext are
SPRINT obj anima
LPM wpt_wo
END
Does it need more writable offsets? Nythrun's list (http://forums.gibberlings3.net/index.php?showtopic=9157&st=0&p=76429&#entry76429), AG's list (http://www.shsforums.net/topic/33231-area-modding-tool-tutorial-by-qwinn/page__view__findpost__p__452061) or IESDP (http://iesdp.gibberlings3.net/file_formats/ie_formats/are_v1.htm#formAREAV1_0_Anim).
Miloch, you go ahead and test it. I know you love testing :)
Though I see no reason it shouldn't work, the writing macro is from my personal lib and was working reliably.
COPY_EXISTING ar0500.are override
LPF add_area_animation
INT_VAR
flags=7
position_X=2400
position_Y=1400
position_Z=85
STR_VAR
name=ag_test_anima
bam_source=fire_3
END
BUT_ONLY
-
BNOT 0 is a cool trick if you don't know 2-complement notation :D
OK, I don't understand this. With TP2 syntax and a determinate data size, it's simple to express -N as BNOT N-1 (e.g., `0 is -1, or Miloch's version of fancy ~-1~ about as fancy as a cow's rear, or "all bits," which is what we really mean with a null strref).
I call bullshit that you actually had a point there. TP2 CODE OR IT DIDN'T HAPPENZ!
-
2-complement means that "0 - x" is expressed as "(` x) + 1".
-
Like I said, how is `(x-1) a "cool trick" over `1 + 1 at a fixed data size?
E.g., if I want to WRITE_SHORT -126, your implication was that two's-complement would give me something "cooler" than `125?
WHAT COULD BE COOLER THAN `125?
I expect some uber pwnage when you make a statement like "BNOT 0 is a cool trick if you don't know 2-complement notation."
I caught GeN1e stalking pamela123, checking out her profile. You want to ask her out, don't you, GeN1e?
You should. She goes down on the first date.
-
I caught GeN1e stalking pamela123, checking out her profile.
I thought you were ranking a mere member here, no? Or how can you be knowning if I was checking out a specific profile?
Besides, dev, don't you think you're taking it too far? We all are one big family and we all understand if you can't resist the urge to try and get rough with every underteen slut that comes to PPG, but surely ascribing your perverted carnal desires to me as a form of revenge for me robbing your grandma (hey, that was your suggestion, not mine!) of the photo of you and temujin making out is going beyond all norms assumed in any decent society.
-
but surely ascribing your perverted carnal desires to me as a form of revenge for me robbing your grandma (hey, that was your suggestion, not mine!) of the photo of you and temujin making out is going beyond all norms assumed in any decent society.
Yeah, that's what I thought.
You been busted, boy! Got caught with your hands in the cookie jar.
But don't feel bad. pamela123's got space for lots of hands.
-
Eh, who said I feel bad? I thought that was you feeling all bad and jealous about pamela123 choosing the other guy over you.
-
Has something changed regarding this behavior for WeiDU 214? I'm getting a "ERROR: [mazzy8.cre] -> [override] Patching Failed (COPY) (Invalid_argument("index out of bounds"))" on this code:
// Correct a minor issue in Mazzy's soundset (aVENGER)
ACTION_FOR_EACH ~file~ IN // for each of the following files
~mazzy8~ // Mazzy at level 8 (SoA)
~mazzy9~ // Mazzy at level 9 (SoA)
~mazzy11~ // Mazzy at level 11 (SoA)
~mazzy12~ // Mazzy at level 12 (SoA)
~mazzy15~ // Mazzy at level 15 (ToB)
BEGIN // execute the following
ACTION_IF FILE_EXISTS_IN_GAME ~%file%.cre~ BEGIN // if the file exists
COPY_EXISTING ~%file%.cre~ ~override~
PATCH_IF (%SOURCE_SIZE% > 0x2d3) THEN BEGIN // file size sanity check (filters out 0 byte files i.e. ALLOW_MISSING)
SAY EXISTANCE2 #29727 SAY EXISTANCE3 #-1 // assign the Spell Failed sound to the proper soundslot
END // ends file size check
BUT_ONLY_IF_IT_CHANGES
END // ends ACTION_IF FILE_EXISTS_IN_GAME block
END
-
*sigh*
Uploading a fixed copy of 214.
-
Uploaded. can you devSin reupload the Mac version?
-
Cheers, it works properly now.
-
So basically, what you're saying is that months of effort spent "testing" new releases in private is just a complete fucking waste of time and effort? It doesn't make one god damn bit of difference?
If you admit it, then I will reupload.
-
So basically, what you're saying is that months of effort spent "testing" new releases in private is just a complete fucking waste of time and effort? It doesn't make one god damn bit of difference?
In this particular case, no mod was ever doing SAY xyz #-1 because it didn't work even before, so it wasn't in the test cases. In general, I agree with you that using proper unit testing would be faster than having cmorgan install all mods under the Sun twenty times.
-
In this particular case, no mod was ever doing SAY xyz #-1 because it didn't work even before, so it wasn't in the test cases. In general, I agree with you that using proper unit testing would be faster than having cmorgan install all mods under the Sun twenty times.
I think aVENGER's comment was that he was using this pre-214. Now, it may not have written 2^32 before, but it's always done 2^31 or whatever and it was used in the prehistoric eras.
I uploaded, like, 10 minutes after talking shit in any case. For $150, I will compile a very special personalized version of WeiDU*. Contact me for details.
*Limited time offer. Not available in certain parts of New York. Limit one compile per customer.
-
Plus, I'm teh slow, and sometimes have to be told which of the big button-thingies on the funny glowing tube to press in order to misunderstand what I am looking at. But I am much cheaper than devSin. For $5 and a smile, I'll do anything. A N Y T H I N G.
-
For $5 and a smile, I'll do anything. A N Y T H I N G.
Even moose stuff?