Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Test Subject
Original Poster
#1 Old 4th Jul 2007 at 2:01 PM Last edited by Simbiont : 6th Jul 2007 at 10:46 AM.
Default Brain Picker: Getting to Grips with Object Arrays
As my door is, for now, on ice, I'm working on a reference for the Array Operation primitive, as this one doesn't have a hammer-and-sickle in Simpe/PJSE, with the intent to put it on the Wiki when it's finished (I'm a techical writer by trade, btw).

I've read Adidas' Dialogs and Arrays tutorial (http://www.modthesims2.com/showthread.php?t=111469) thoroughly (that's what got me interested in the first place), but it isn't complete and in places somewhat erroneous. I haven't found any other documentation (yet). So I'd like to run a few things by y'all, as I have only little Sim time myself, and even less for elaborate theory checks.

[Edit: For first time viewers, I'll indicate which questions have already been answered in this thread.]


1) Adidas suggests that an Object Array is dynamically constructed in a global file, instance 0118h. This seems rather unlikely. Logic dict..., erm, reads in a clear voice that the Object Array is contained in a /local/ resource, probably a Str#. (If SimAntics were a programming language, it'd "definately" have a lisp.)
[Edit: Question addressed. Object Arrays aren't Str# resources.]


2) From Adidas' tutorial I understood that every object can have only one Object Array (each line in the Str# resource for each element). However, I now suspect that every line in the resource is an Object Array in itself, and the pointer to the line nr/Object Array is passed in [04-03] (high/low order bytes). Thus, an object can have multiple Object Arrays, all in a single resource.
[Edit: Question addressed. The number of Object Arrays an object can have is defined in the OBJD file, raw data ID 0x003B (Misc category).]


3) Adidas doesn't mention it and SimPE has doubts, but the 09h (remove element at index) function uses the /second/ parameter [08.0A-09] for passing the index. This suggests that the value of the removed element is passed back in the opset for the first param [05.07-06]. If so, then that is probably the case for the other remove element functions too.
Can anyone confirm this?

4) Is there a difference between clearing an Object Array (function 00h) and setting its size to 0 (function 02h)? Logically, clearing should reset the element values to 00h (or 0FFh) before resetting the length, while resizing would leave the old values in place.
Can anyone confirm this?


5) Function 02h sets the Object Array size. If the new size is larger than the old one, what happens? Are the new elements initialized (eg with 0 or -1), or do they retain their earlier value? If the latter, what happens if the array is set to a size larger than ever before?
Can anyone elaborate?


6) It wouldn't make sense to predefine the Str# 0118h resource, as it contains object IDs that are generated in-play, but theoretically it is possible to have a Str# 0118h in your package. This file should be zapped and initialized before any array is actually created or accessed (if only because Object Arrays probably are stored as a word array not a text string).
[Edit: Question addressed. Object Arrays aren't Str# resources]

7) Are Object Arrays, like attributes, saved with the object instance? Normally a Str# resource isn't saved, but reloaded from template each time the object is loaded, but there may be exceptions.
[Question addressed: Object Arrays /are/ saved with every instance of an object.]

7a) What's the point of sorting an Object Array? All it contains are Object IDs, that are generated in-play. Sorting them in creation order doesn't in any way relate to the object types, GUIDs, families, skill levels or whatever useful sorts there may be.
It would be different, of course, if one could specify an attribute for the sort, but nothing I read so far supports this, and neither does Simpe.
Am I missing something?


9) Many primitives take a byte triplet for their data reference. In my private notes, I use the notation [aa.bb-cc] where
- aa is the operand containing the data scope (local/global/temp/literal etc),
- bb is the operand containg the high order byte of the data pointer (or literal in the case of a literal data scope)
- cc is the operand containing the low order byte of the data pointer (or literal)
In most programming environments, dots are used to subdivide domains (as does the Internet addressing scheme, albeit in reversed hierarchy), and dashes to speficy a range (either forward or backward). And in some (older) PLs square brackets were used to differentiate between pointers and literals. So to me, this shorthand makes sense.
But if there's a standard SimAntics notation for such triplets, I'd be happy to conform.

On the same note, I use the term "scope" to identify the data "instance ID" space. I've seen other terms used: domain, owner, range etc. Is any of these standard?
Advertisement
Retired Duck
retired moderator
#2 Old 5th Jul 2007 at 12:24 PM
Okay, I haven't actually read Adidas' tutorial (shame on me!) but I'll pass on what I've observed in my very occasional encounters with arrays.

...the Object Array is contained in a /local/ resource, probably a Str#.
Object arrays are declared in the OBJD (raw data 0x3B: number of object arrays), and are stored at the stack level (class variables to OO users). I'm not sure how they get initialized, BHAVs, STRs etc...


...every object can have only one Object Array (each line in the Str# resource for each element).
Not in my experience, the number of arrays the object has is specified in the OBJD. If you view a stack dump for the object you get a list of all the arrays the object has. I've seen objects with 20+ arrays of varying length.

... However, I now suspect that every line in the resource is an Object Array in itself, and the pointer to the line nr/Object Array is passed in [04-03] (high/low order bytes). You've lost me here... Which line in which resource are we talking about?

Are Object Arrays, like attributes, saved with the object instance?
Yup. Stored at the stack level.

What's the point of sorting an Object Array? I don't think arrays are limited solely to objects, they're just integer arrays which generally hold references to objects (like the stack object id). I have a feeling I've seen cases which use neighbor IDs are stored in an array? Perhaps the sorting is for when values other than object IDs are stored in it?

Many primitives take a byte triplet for their data reference. In my private notes, I use the notation [aa.bb-cc] where
- aa is the operand containing the data scope (local/global/temp/literal etc),
- bb is the operand containg the high order byte of the data pointer (or literal in the case of a literal data scope)
- cc is the operand containing the low order byte of the data pointer (or literal)


That's a fairly standard format for passing parameters. Check out the last part of "passing variables to functions" in this one for more details:
http://www.modthesims2.com/showthread.php?t=212101
As for standards in writing them out, mostly they get described with words ("Stack Object ID 0x0000", "My 0x000B (Object Id)" etc). I've never really seen a standard in this community for describing the ranges each type can take though.

On the same note, I use the term "scope" to identify the data "instance ID" space. I've seen other terms used: domain, owner, range etc. Is any of these standard? I tend to use "data owner" and "data value", I have a feeling I probably picked that up from various TS2 docs. Again, there's no particular standard defined.

Not sure if it's of any use to you, but this was in the TS2 differences doc:
Quote:
Object Arrays:

Object arrays are declared similar to object attributes in that there is an object definition field to specify the total number of arrays to allocate for a given object. Unlike attributes though, there is no minimum number.

There is direct access to existing elements of arrays via 3 owner-data pairs. The first is an iterator accessor. The second is an indexed mode.

The iterator has 2 owner-data pairs. The first is access to the index that the iterator is looking at (My/SO's Object Array Iterator Index). The second is the data pointed to by the iterator(My/SO's Object Array Iterator Data). If the iterator index is addressing an invalid location, accessing the iterator data will result in an object error. There are also elements in the tracer window to access this directly, you can also use it to inspect a given array.

The indexed mode owner data(My/SO's Object Array At Temp) allows you to use temp 0 to index the array. As with the iterator If the index passed in temp 0 is addressing an invalid location, accessing this owner data pair will result in an object error.

Array Operation Primitive:

This primitive allows you to perform functions on array that can change the make up of a given array. The following operations are supported:
Clear: Clears all elements of the array.
Size: Returns the size of the array.
Resize: Resizes the array to the specified size.
Init: Sets all elements of the array to the value specified.
Add To Front: Pushes the specified value onto the front of the array.
Add To Back: Pushes the specified value onto the back of the array.
Insert At Parameter 2 Iterator Pushes the value in parameter 1 into the array at the index specified in parameter 2.
Remove From Front: Removes the front element of the array.
Remove From Back: Removes the back element of the array.
Remove From Parameter 2 Iterator: Removes the element at the index specified by parameter 2 from the array.
Set Parameter 2 Iterator To Next Occurance Of Parameter 1 This is a true/false return operation. It functions exactly like Set To Next, BUT you specify the index to start the search at in parameter 2 and it will search array[parameter 2, end) for parameter 1. True means it exists and parameter 2 is set to the location of the found element.
Swap Parameter 1 And Parameter 2 Swaps the array element indexed by parameter 1 and parameter 2
Sort Highest Front sorts the array as largest to smallest.
Sort Lowest Front sorts the array as smallest to largest


Finally, I wish you all the best! We can use all the documentation we can get for these sorts of things!
One horse disagreer of the Apocalypse
#3 Old 5th Jul 2007 at 12:47 PM
I'd better give Peter a pointer to this thread

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
Original Poster
#4 Old 5th Jul 2007 at 2:49 PM Last edited by Simbiont : 6th Jul 2007 at 10:51 AM.
Hi Echo,

Thanks for your input. I missed the OA setting in the raw OBJD; shame on me But this explains a lot. Cheers, mate.

Re sorting: So far I've only found references to /Object/ Arrays not other sorts, erm, types. It did occur to me that you can put other values than Object IDs in them, as long as they're word values (eg a copy of a SIM's motives), but even then, I don't much get the point of sorting them. Now if you could sort by an /attribute/ of the object data, I'd see numerous possibilities (eg getting all Sims on the lot sorted by Family/Name not Object ID), but so far that seems to be out.

Your TS2 differences quote was quite helpful in that it pointed me to the Search-and-Destroy capability of the 09h function. So that's what the first parameter is for, not for returning the removed element value. I hadn't stumbled upon that one yet. Very useful, eg for removing a specific keyholder from your keyholders list.
[Addition: Oops, I misread something here, or rather, mixed up two functions. Question not answered yet. I'm away this weekend, but I'll do some extensive testing afterwards.]

As for your TS2 Data Types link, that was one of the first "tutorials" I saved locally. I'm not really new to data types and scopes (I first began programming somewhere in the late 70s, and there aren't many PLs I haven't at least dabbled in), but everyone who is confused by SimAntics data handling should definitely read your overview first.
So let me repeat the link: http://www.modthesims2.com/showthread.php?t=212101

My notation: It's not so much about writing out the data scope, I need a concise way to identify the operands data are passed in for use in quick references, eg:

| Function: Resize Object Array
| Operands:
| - [00-01] Function identifier, always 0x0002
| - [02] (Boolean) False: My Object Array, True: Stack Object's Object Array
| - [04-03] Object Array Identifier
| - [05.07-06] New Object Array size
| Returns:
| - True: Always
| - False: Never
| - [temp.0x0000] New size of array

without having to explain in detail how to use the individual operands.

As for data owner/scope:
In most programming languages, "data owner" refers to the object (or on OS level, the application) the data belong to. So formally, My, My Attributes, My Object Array etc all have the same data owner, but different data scopes (or namespaces). On the other hand, Object 1's My and Object 2's My have the same data scope, but different data owners. (And "My" and "Stack Object's" have the same data scope, but *may* have different data owners, depending on whether the're launched from an OBJf or TTAB class call.)
That's why I find the SimAntics "data owner" usage somewhat confusing, just like the usage of "Instance" to identify a part of a template; most PLs would use "Resource ID" or something like that.
It's just that I'm over 50 and don't adapt that easily anymore

One last question: I've downloaded Sims2Differences.doc, but it seems to be just a chapter (#8, to be exact) of a larger document. Do you have any idea where I can find the rest? It's yummy reading.

And does the BhavGuide have any EPs?
Don't ask me, I just code
#5 Old 7th Jul 2007 at 4:29 PM Last edited by pljones : 7th Jul 2007 at 11:06 PM.
Quote:
Adidas suggests that an Object Array is dynamically constructed in a global file, instance 0118h.
That STR# file just contains the names of the arrays for this object. If you create such a file, the parser will use it to name your arrays. (Of course, the game couldn't care less at run time.)

<edit>
And I've updated PJSE because of this thread.
1) Shiney new Wizard
2) Improved parsing for [My|Stack Object's] Object Array
Expect it in the next few days or so.
</edit>
Don't ask me, I just code
#6 Old 8th Jul 2007 at 10:44 AM
Oh, and of course you can manipulate the iterator index and selected element data (Data Owners 0x29 to 0x2E) using OpCode 2 or anywhere else a data owner/value is used. The new parsing should make this slightly clearer.

One question: indexing by "Temp" - is that by Temp0?
One horse disagreer of the Apocalypse
#7 Old 8th Jul 2007 at 11:08 AM
In other places where a thing is indexed by Temp, you can specify which Temp in the parameters.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Don't ask me, I just code
#8 Old 8th Jul 2007 at 12:22 PM
Quote: Originally posted by Inge Jones
In other places where a thing is indexed by Temp, you can specify which Temp in the parameters.
That's why I'm asking. Here the parameter is the array being indexed. I think.
One horse disagreer of the Apocalypse
#9 Old 8th Jul 2007 at 1:04 PM
Having reread this thread, I would say that it's only Temp0 that is offered, as worded by this:

Quote:
The indexed mode owner data(My/SO's Object Array At Temp) allows you to use temp 0 to index the array

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
One horse disagreer of the Apocalypse
#10 Old 9th Jul 2007 at 9:16 PM
Right... does anyone want to offer to test the wizard?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
Original Poster
#11 Old 10th Jul 2007 at 4:50 AM Last edited by Simbiont : 10th Jul 2007 at 3:26 PM.
Hi Inge, Peter,

--"does anyone want to offer to test the wizard"
--

Yes, I do! Silly question


--"The indexed mode owner data(My/SO's Object Array At Temp) allows you to use temp 0 to index the array "
--

I'm still curious how to toggle between "iterator accessor mode" and indexed mode. So far, all I found was that [04-03] specifies which Object Array to use, while [08.0A-09] indexes the array itself.

When I first read Adidas' tutorial, I thought that Op2 contained a flag byte with bit 02h (00000010b) selecting either My or SO's Object Array, and I wondered what the other flags were for, especially the 01h (00000001b) bit. Then I found that according to Simpe/PJSE, only a 00h value selected My OA, while any other value selected SO's OA, so I decided that Op2 probably was just a boolean. But considering Echo's quote, my first hunch may have been right after all.
[Edit:] On the other hand, it's also possible that Op0 is used as a toggle.

Echo's quote also states that there are 3 owner-data pairs for this primitive. But the array identifier is /not/ an owner-data pair, at least not a regular one. It's a two-byte index to the Object Array, no scope byte (there's no need for one, after all).

Another question: So far I only tested the Object Array primitive with a value of 0x0000 in [04-03], and that seemed to work. So the Object Array Identifier seems to be a zero-based index. Yet owner-data pairs usually are 1-based indexes, so that's probably the case for [08.0A-09] too -- it's only logical to assume that the 1-to-0-base translation is part of the owner-data pair parser. But if an index is passed in [temp.0x0000], there's no owner-data pair involved, which would possibly mean that in /that/ case, it might be interpreted as a zero-based index.

I still haven't gotten around to testing, but I might as well do that with the new wizard.

Any news about possible return values for functions 07h/08h/09h?
Don't ask me, I just code
#12 Old 10th Jul 2007 at 6:11 PM Last edited by pljones : 10th Jul 2007 at 6:18 PM.
Start off from the recognition I don't mod

-- I'm still curious how to toggle between "iterator accessor mode" and indexed mode.
I think this "indexed mode" is used through DataOwners 0x2D and 0x2E: My Object Array [array] data element Temp0 and SO's ... Temp0.

-- I thought that Op2 contained a flag byte with bit 02h (00000010b)...
Aha, you may have spotted a bug already: I only knew "zero or non-zero" for Op2, so I've used bit 1 (00000001b).

-- there are 3 owner-data pairs
Nope, two: Value (or other index for swap) and Index.

-- But if an index is passed in [temp.0x0000], there's no owner-data pair involved, which would possibly mean that in /that/ case, it might be interpreted as a zero-based index

You're confusing the array number and the element index, I think. The value in [04-03] is the array number you're working with. Index mode should be using Temp0 in place of the element index (as opposed to setting the iterator index for the array using Data Owners 0x28 and 0x29). Index mode doesn't apply to these array-level operations, only when accessing an array as a Data Owner.

For example, two ways to set a value in an array:

"Direct" mode:
My object array 0x0000 ("Array 0x0000") iterator Index := Literal 0x0000
My object array 0x0000 ("Array 0x0000") iterator Data := Literal 0x002A

Indexed mode:
Temp 0x0000 := Literal 0x0000
My object array 0x0000 ("Array 0x0000") element at Temp0 := Literal 0x002A

You could loop either of those, incrementing either the iterator Index or Temp0.

"iterator Index" and "iterator Data" wording could be changed to, say, "Iterator" and "element at Iterator".
Test Subject
Original Poster
#13 Old 11th Jul 2007 at 5:25 AM Last edited by Simbiont : 11th Jul 2007 at 5:37 PM.
Hi Peter,

(I'm not exactly a modfather myself -- I'm a fadmodder at best )

--"I think this "indexed mode" is used through DataOwners 0x2D and 0x2E"
--

That makes sense.


--"I only knew "zero or non-zero" for Op2, so I've used bit 1"
--

Clearing bit 1 doesn't put a zero value in Op2. Remember that the wizard doesn't initialize the operands. If there are other bits set, clearing bit 1 still doesn't yield a zero value. I think that for now it's probably safest to use only a real boolean here (either 00h or 0FFh). Until we find out what the other flags, if there are any, are used for.
[Edit:] I've begun testing, and Op2 is indeed a boolean value not a flag byte. False (00h) makes My Object Array the dataspace, any other value addresses Stack Object's Object Array. So True (0FFh) would indeed be the formally correct value to put in Op2 in this case.

3/2 owner-data pairs: Echo's quote from the Sims2Differences.doc (which I understand was taken from the Maxis site when they were still thinking about releasing Edith) states that the Array Operations primitive uses /three/ owner-data pairs. I, too, have only found 2 real OD pairs, plus of course the Object Array Identifier (number), but that isn't a real OD pair, only D.


--"You're confusing the array number and the element index"
--

No, no. It's just that I assumed a difference in parsing a straight word value and a owner-data pair. Most owner-data pair indexes (literals, iterators, whatever word you want to use) are 1-based, even if the corresponding array is in fact zero-based. Think about the BCON resources; the BCON plugin numbers them from 0x0000 up, while calls from a BHAV require an index from 0x0001 and up. So BHAV index 0x0001 actually references line 0x0000 in the constant list. The OA Identifier in [04-03] however is zero-based.
BUT if the indexed mode takes its data scope from data owner 0x28 and 0x29, it's still a OD pair even if the actual data word isn't used, so it's probably a 1-based index we're talking about.

I have to admit that I find the SimAntics lingo still somewhat confusing. Eg the usage of "literal" when you're not actually passing a literal -- you're only passing a literal when the data scope (or owner) is "literal". In all other cases, whenever a wizard labels a value as "literal", you're actually passing an index to a resource, attribute list etc.

Same thing with "iterator" by the way -- in any other language, an index is only an iterator when it's looped (and not all iterators are indexes either -- sometimes they're just counters). If you're, eg, removing an element at position xx from an array, xx isn't an iterator, just an index. "Iterator data" is, to me, very, very counter-intuitive .
Retired Duck
retired moderator
#14 Old 11th Jul 2007 at 10:34 AM
Simbiont - SimAntics is not such a high generation language as to recognize iterators, or the differentiate between a literal offset to an array and a literal value in an expression. If it helps, try and think of pretty much every value stored in the game as integers. Arrays of integers, global integers, stack object ID integers, everything. All parameters that you pass to functions are integers, and all return values are booleans. If you can follow it that way it does make more sense. You're passing an integer (by value, not by reference), you just have to specify where the value of that integer is coming from, a literal, a variable, etc...

Basically, think in C, not in Java. (or even better, x86 or MIPS! )
Test Subject
Original Poster
#15 Old 11th Jul 2007 at 11:35 AM Last edited by Simbiont : 11th Jul 2007 at 5:42 PM.
Hi Echo,

<wide grin>

I think you misunderstand me here. Whether a variable is called an index, iterator, etc does not depend on the language compiler or interpreter. As far as the engine is concerned, there are only two types of data: pointers and literal values (ok, and instructions). Literal values are processed directly; a pointer tells the engine to get the actual data somewhere else.
It's about how the /users/ of a language call a data chunk that is used for a specific purpose.

For example x86. There are no real variables there, just values in registers. But take for instance the CX register:
- If you use CX to drive a REP MOVS instruction, it's an iterator, eg. MOV CX,08h : REP MOVSB.
- If you use CX in combination with the SI/DI register, it's an index (in this case, a byte offset), eg MOV [DI][CX],01h. [Edit: At first I wasn't sure whether x86 did indeed support this (it's been a while ), but it did.]
- And if you use CX for math operations, it's an operand, eg ADD AX,CX.

The processor doesn't need these descriptions and doesn't care, but for the programmer's documentation (and comprehension), using the right words can make a lot of difference.

When a programmer calls a value a "literal", there's the underlying supposition that any operation is performed on /that literal value/. If you add 1 to a literal 0x0002, the result is /always/ 0x0003, no matter what programming language is used.

If in SimAntics you assign a value to a owner-data pair and the owner is /not/ "literal", then adding 1 to the data does /not/ increment the actual value in the data word. So it's not a literal. It's as simple as that.
In x86 terms, the owner acts as the base pointer (BP register), whereas the data word acts as the Destination Index (DI register).

You are somewhat right in stating that SimAntics doesn't recognize iterators, but that's only because there aren't any looping instructions in the SimANtics instruction set. Yet it is possible to loop by testing a value and performing a jump according to the outcome. In that case, the tested value is still an iterator.

All in all it's not so much that I find SimAntics itself confusing, but it's the SimAntics /documentation/ that is a bit counterintuitive at times.
[Edit: There's a good chance that this is a strategic Maxis decision ]


--"All return values are booleans"
--

That's not entirely true. Functions can return other values as well, usually in a temp variable. And "Error" is a value in itself.
One horse disagreer of the Apocalypse
#16 Old 11th Jul 2007 at 12:15 PM
Quote: Originally posted by Simbiont
As my door is, for now, on ice


Does this hack help at all? http://www.modthesims2.com/showthread.php?t=239182

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
Original Poster
#17 Old 11th Jul 2007 at 4:49 PM
Hi Inge,

You're a doll.
I'm good for now, but I'll take a peek shortly.

<3
Don't ask me, I just code
#18 Old 11th Jul 2007 at 7:44 PM
-- [Edit: There's a good chance that this is a strategic Maxis decision]
Unlikely given most of it's "leaked"... And having seen some of the edith screenshots, it looks like those working "inside" have a pretty tough time. Probably why the Lua opcode was added..!

The data owners are all data stores: the only one that's "exceptional" is "Literal". You can't add one to "Literal 1", as it's not somewhere you can store data. It should raise a runtime error... (Various other places are "read-only", of course...)


-- --"All return values are booleans"
-- That's not entirely true.
Well, it is really: "Error" is an exception, not a return value.
Test Subject
Original Poster
#19 Old 12th Jul 2007 at 3:35 PM Last edited by Simbiont : 12th Jul 2007 at 3:56 PM.
Hi Peter,

--"You can't add one to "Literal 1", as it's not somewhere you can store data"
--

Of course you can.
You just have to store the result somewhere else.

But maybe I've worded my example badly considering the SimAntics limitations, so let me rephrase:
| "If you add a literal 0x0001 to any value, that value is
| /always/ incremented by 1,no matter what programming
| language is used."

OK, any /numeric/ value.

In fact, you're supporting my statement: [My.literal] points to a memory location that you /can/ store data in. So it's not a literal; it's a data pointer.

I appreciate that the BHAV wizard puts a literal data word into the operands concerned, but that's only a literal value at compile time; the SimAntics engine does /not/ handle it as such, and that's what counts.


--"looks like those working "inside" have a pretty tough time. Probably why the Lua opcode was added..!"
--

H'm, dunno.
I'd give a mint for an in-game BHAV editor. So far, testing even the simplest of functions is worse than installing Win3 software. Reboot, reboot, reboot.

I've been wondering about LUA. I've had a peek, but I'm not especially keen of learning yet another scripting language. I understand that LUA was introduced later, with the Pets EP if I'm right. This would mean that it isn't base-game compatible, right?
Don't ask me, I just code
#20 Old 12th Jul 2007 at 8:22 PM Last edited by pljones : 12th Jul 2007 at 10:43 PM.
Quote: Originally posted by Simbiont
Hi Peter,

--"You can't add one to "Literal 1", as it's not somewhere you can store data"
--

Of course you can.
You just have to store the result somewhere else.
But then it wouldn't matter what two values you were adding, you could always store the result somewhere else. We're talking about operations on Data Owners. You can't add to Literals. :P
Quote: Originally posted by Simbiont
[My.literal]
No such data owner.
Quote: Originally posted by Simbiont
--"looks like those working "inside" have a pretty tough time. Probably why the Lua opcode was added..!"
H'm, dunno.
I'd give a mint for an in-game BHAV editor. So far, testing even the simplest of functions is worse than installing Win3 software. Reboot, reboot, reboot.
There is that... I've been waiting for someone to understand how to hook into the game but it's probably a compile-time option not enabled on the production version.
Instructor
#21 Old 14th Nov 2007 at 11:30 AM
It will take a bit time to swallow all information, but when I was linked here I was intended to read whatever. My purpose is only to gather enough know-how to complete some mods. All I know is that I stablish the parameters to be used in a bhav, declare enough variables, read the logic of the construction xtimes and my mind concludes that it is 100% OK. Place the mod in the game, it barely works and all my parameters are ignored. Most of the time I have problems with the VG (visitor generator) which seems to be completely analphabet.
Have never thought about Object arrays or similar - don't know how deep I can dive on this. Well, I can observe and hopefully learn something.
One horse disagreer of the Apocalypse
#22 Old 14th Nov 2007 at 11:41 AM
Peter, change your sig to go to the main page, not the forum

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Retired Duck
retired moderator
#23 Old 14th Nov 2007 at 10:15 PM
xptl297 - What do you need to use arrays in? There are only a few cases where they're used at all in the game, and with only a few exceptions most mods can do without using or editing them...
Back to top