Welcome,
Guest
. Please
login
or
register
.
March 16, 2010, 01:52:30 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Unfinished Business 18 released! More info available on the
UB site
.
131346
Posts in
13306
Topics by
3849
Members
Latest Member:
Kilmor of Gelnor
Pocket Plane Group
Friends and Neighbors
Weimer Republic (WeiDU.org)
WeiDU
(Moderators:
weimer
,
the bigg
)
SAY [OFFSET] #-1
« previous
next »
Pages:
[
1
]
2
Author
Topic: SAY [OFFSET] #-1 (Read 1857 times)
Miloch
Barbarian
Planewalker
Offline
Gender:
Posts: 564
SAY [OFFSET] #-1
«
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).
Logged
Tutu/BGT Area Map & List
*
Tutu Mod List
*
BG1 Fixpack
*
Lost Items
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
Offline
Gender:
Posts: 3191
Re: SAY [OFFSET] #-1
«
Reply #1 on:
October 08, 2009, 06:16:19 AM »
Is there any reason (except for expecting WeiDU to actually be consistent) why you can't WRITE_LONG OFFSET (0 - 1)?
Logged
Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
GeN1e
Planewalker
Offline
Gender:
Posts: 163
Re: SAY [OFFSET] #-1
«
Reply #2 on:
October 08, 2009, 08:14:36 AM »
Yep, have run into the same thing few days earlier while testing my new library.
You can also use ~-1~.
Logged
Miloch
Barbarian
Planewalker
Offline
Gender:
Posts: 564
Re: SAY [OFFSET] #-1
«
Reply #3 on:
October 13, 2009, 05:08:33 PM »
Quote from: the bigg on October 08, 2009, 06:16:19 AM
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?!
Logged
Tutu/BGT Area Map & List
*
Tutu Mod List
*
BG1 Fixpack
*
Lost Items
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
Offline
Gender:
Posts: 3191
Re: SAY [OFFSET] #-1
«
Reply #4 on:
October 13, 2009, 06:18:56 PM »
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
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.
Logged
Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
cmorgan
Planewalker
Offline
Gender:
Posts: 1234
Searcher of Bugs
Re: SAY [OFFSET] #-1
«
Reply #5 on:
October 13, 2009, 08:35:04 PM »
*perfect* clip *)
Logged
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
Offline
Gender:
Posts: 3191
Re: SAY [OFFSET] #-1
«
Reply #6 on:
October 14, 2009, 06:21:43 AM »
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.
Logged
Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
cmorgan
Planewalker
Offline
Gender:
Posts: 1234
Searcher of Bugs
Re: SAY [OFFSET] #-1
«
Reply #7 on:
October 14, 2009, 06:46:32 AM »
You could try movie soundtracks from "Jaws", "The Shining", or perhaps even "The Twilight Zone"
Logged
Miloch
Barbarian
Planewalker
Offline
Gender:
Posts: 564
Re: SAY [OFFSET] #-1
«
Reply #8 on:
October 14, 2009, 11:25:43 AM »
Perhaps the Geto Boys' timeless classic "Still" (the theme played during the printer/fax machine baseball-bat-bashing in the movie "Office Space").
Logged
Tutu/BGT Area Map & List
*
Tutu Mod List
*
BG1 Fixpack
*
Lost Items
temujin
Planewalker
Offline
Posts: 48
Re: SAY [OFFSET] #-1
«
Reply #9 on:
October 14, 2009, 10:40:24 PM »
I think this
nice little Bambi music
would also be appropriate.
Logged
Nythrun
Planewalker
Offline
Gender:
Posts: 89
Re: SAY [OFFSET] #-1
«
Reply #10 on:
January 08, 2010, 02:41:29 AM »
Quote from: Miloch on October 08, 2009, 02:25:16 AM
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
Logged
Miloch
Barbarian
Planewalker
Offline
Gender:
Posts: 564
Re: SAY [OFFSET] #-1
«
Reply #11 on:
January 08, 2010, 04:26:05 PM »
Quote from: Nythrun on January 08, 2010, 02:41:29 AM
Quote from: Miloch on October 08, 2009, 02:25:16 AM
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
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?
Logged
Tutu/BGT Area Map & List
*
Tutu Mod List
*
BG1 Fixpack
*
Lost Items
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
Offline
Gender:
Posts: 3191
Re: SAY [OFFSET] #-1
«
Reply #12 on:
January 08, 2010, 04:33:25 PM »
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.
Logged
Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
cmorgan
Planewalker
Offline
Gender:
Posts: 1234
Searcher of Bugs
Re: SAY [OFFSET] #-1
«
Reply #13 on:
January 10, 2010, 11:40:48 AM »
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.
Logged
Miloch
Barbarian
Planewalker
Offline
Gender:
Posts: 564
Re: SAY [OFFSET] #-1
«
Reply #14 on:
January 10, 2010, 06:02:34 PM »
Quote from: cmorgan on January 10, 2010, 11:40:48 AM
(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?
Logged
Tutu/BGT Area Map & List
*
Tutu Mod List
*
BG1 Fixpack
*
Lost Items
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
Offline
Gender:
Posts: 3191
Re: SAY [OFFSET] #-1
«
Reply #15 on:
January 10, 2010, 07:04:58 PM »
BNOT 0 is a cool trick if you don't know 2-complement notation
Logged
Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
devSin
Planewalker
Offline
Gender:
Posts: 1479
Re: SAY [OFFSET] #-1
«
Reply #16 on:
January 10, 2010, 07:51:39 PM »
yawn
«
Last Edit: January 10, 2010, 07:58:12 PM by devSin
»
Logged
temujin.
Guest
Re: SAY [OFFSET] #-1
«
Reply #17 on:
January 10, 2010, 08:36:50 PM »
Quote
« Last Edit: Today at 07:58:12 PM by devSin »
<3 devSin
Logged
cmorgan
Planewalker
Offline
Gender:
Posts: 1234
Searcher of Bugs
Re: SAY [OFFSET] #-1
«
Reply #18 on:
January 10, 2010, 10:17:50 PM »
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!)
Logged
GeN1e
Planewalker
Offline
Gender:
Posts: 163
Re: SAY [OFFSET] #-1
«
Reply #19 on:
January 11, 2010, 05:24:38 AM »
Quote
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?
Code:
// 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
,
AG's list
or
IESDP
.
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.
Code:
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
Logged
devSin
Planewalker
Offline
Gender:
Posts: 1479
Re: SAY [OFFSET] #-1
«
Reply #20 on:
January 11, 2010, 12:03:36 PM »
Quote from: the bigg on January 10, 2010, 07:04:58 PM
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!
Logged
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
Offline
Gender:
Posts: 3191
Re: SAY [OFFSET] #-1
«
Reply #21 on:
January 11, 2010, 12:46:02 PM »
2-complement means that "0 - x" is expressed as "(` x) + 1".
Logged
Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
devSin
Planewalker
Offline
Gender:
Posts: 1479
Re: SAY [OFFSET] #-1
«
Reply #22 on:
January 11, 2010, 03:40:52 PM »
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.
«
Last Edit: January 11, 2010, 03:45:48 PM by devSin
»
Logged
GeN1e
Planewalker
Offline
Gender:
Posts: 163
Re: SAY [OFFSET] #-1
«
Reply #23 on:
January 11, 2010, 04:24:34 PM »
Quote
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.
Logged
devSin
Planewalker
Offline
Gender:
Posts: 1479
Re: SAY [OFFSET] #-1
«
Reply #24 on:
January 11, 2010, 04:44:29 PM »
Quote from: GeN1e on January 11, 2010, 04:24:34 PM
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.
Logged
Pages:
[
1
]
2
« previous
next »
Jump to:
Please select a destination:
-----------------------------
BG2 Completed Mods
-----------------------------
=> Kelsey
=> Banter Packs
=> de'Arnise Romance
=> Unfinished Business
===> UB Workroom
===> Finished Business
=> Quest Pack
===> Quest BETA
=> NPC Flirt Packs
=> Virtue
=> Keto
=> Xan
=> Assassinations
=> Dungeon Crawl
=> Six's Idle Meddlings
=> Turnabout
=> Dungeon-Be-Gone
=> House Of Sim
=> Ashes of Embers
=> Zyraen's Miscellaneous Mods
=> Event Modding: Iron Modder and One-Day NPC
-----------------------------
BG1 Completed Mods
-----------------------------
=> BG1Tutu General
===> BG1Tutu Bugs and Support
===> BG1Tutu V6 Beta
=> Tutu Mods and Modding
=> The Fields of the Dead
=> BG1 Unfinished Business
===> BG1UB Workroom
===> BG1 Finished Business
-----------------------------
IWD Completed Mods
-----------------------------
=> Icewind Dale NPCs
-----------------------------
Works In Progress
-----------------------------
=> Zathali
=> King Strohm's Tomb
===> Surayah
=====> Hessa
===> Cailean
===> Lady Delcia Caan Romance (Replace This Mod!)
-----------------------------
Friends and Neighbors
-----------------------------
=> Weimer Republic (WeiDU.org)
===> Solaufein
===> Solaufein Workshop
===> Valen
===> Ascension/WeiDU
===> Other Weimer Mods
===> WeiDU
===> Icewind Gate II
=> Near Infinity
-----------------------------
Miscellany, Inc.
-----------------------------
=> BG/PST/IWD Gameplay
===> All Other Gaming
=> Mod Discussion and Announcements
=> Infinity Engine Modding Q&A
=> Tutorials
=> Fan Fiction
===> Bad Kelsey: A Challenge
=> Ensign First Class Blather