Element Data: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
m (Template outdated added)
Line 1: Line 1:
''Note: this is an outdated proposal page. Information about the element data system can be found in [[Element data]].''
{{Outdated|This is an outdated proposal page. Information about the element data system can be found in [[Element data]].}}


Elements currently can store arbitrary data values. It is proposed that these values are also read from the XML map file's attributes, when the map is loaded. This would have the impact that XML event handlers would be also become element data values, but somewhat confusingly to users, editing this data would not change the actual code. It may be advisable that event handlers are loaded from this element data, rather than from the raw XML data. This would in theory allow self-writing code, for example, you could use [[setElementData]] to write some code, then call addEvent to add an event of that name. Perhaps it would be useful to make it so that element data is tied to events, so that if you change the element data for an event, the code is reloaded into the VM and overwrites the existing (hidden) function. This would probably be relatively trivial to implement.
Elements currently can store arbitrary data values. It is proposed that these values are also read from the XML map file's attributes, when the map is loaded. This would have the impact that XML event handlers would be also become element data values, but somewhat confusingly to users, editing this data would not change the actual code. It may be advisable that event handlers are loaded from this element data, rather than from the raw XML data. This would in theory allow self-writing code, for example, you could use [[setElementData]] to write some code, then call addEvent to add an event of that name. Perhaps it would be useful to make it so that element data is tied to events, so that if you change the element data for an event, the code is reloaded into the VM and overwrites the existing (hidden) function. This would probably be relatively trivial to implement.

Revision as of 15:47, 11 November 2011

Dialog-information.png This article is (partially) outdated and the information may no longer apply.

Reason: This is an outdated proposal page. Information about the element data system can be found in Element data.

Elements currently can store arbitrary data values. It is proposed that these values are also read from the XML map file's attributes, when the map is loaded. This would have the impact that XML event handlers would be also become element data values, but somewhat confusingly to users, editing this data would not change the actual code. It may be advisable that event handlers are loaded from this element data, rather than from the raw XML data. This would in theory allow self-writing code, for example, you could use setElementData to write some code, then call addEvent to add an event of that name. Perhaps it would be useful to make it so that element data is tied to events, so that if you change the element data for an event, the code is reloaded into the VM and overwrites the existing (hidden) function. This would probably be relatively trivial to implement.