https://wiki.datarealms.com/index.php?title=Special:Contributions/Brendan&feed=atom&limit=50&target=Brendan&year=&month=Data Realms Wiki - User contributions [en]2024-03-29T06:33:54ZFrom Data Realms WikiMediaWiki 1.16.5https://wiki.datarealms.com/LuaDocs/MOSpriteLuaDocs/MOSprite2013-04-09T04:10:18Z<p>Brendan: More detail on the values of SpriteAnimMode.</p>
<hr />
<div><br />
===Parent: [[MovableObject|MovableObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass that is graphically represented by a<br />
BITMAP.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
<br />
==Enumerations==<br />
===SpriteAnimMode===<br />
* 0 = NOANIM<br />
* 1 = ALWAYSLOOP<br />
* 2 = ALWAYSRANDOM<br />
* 3 = ALWAYSPINGPONG<br />
* 4 = LOOPWHENMOVING<br />
* 5 = LOOPWHENOPENCLOSE<br />
* 6 = PINGPONGOPENCLOSE<br />
<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.A string with the friendly-formatted type name of this object.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.The largest diameter across its graphical representation.<br />
<br />
===BoundingBox===<br />
Read-only property. The oriented bounding box which is guaranteed to contain this, taking rotation etc into account. It's not guaranteed to be fit perfectly though. TODO: MAKE FIT BETTERA Box which is guaranteed to contain this. Does nto take wrapping into account, and parts of this box may be out of bounds!<br />
<br />
===FrameCount===<br />
Read-only property. The number of frames in this MOSprite's animation.The frame count.<br />
<br />
===SpriteOffset===<br />
The offset that the BITMAP has from the position of this MOSprite.A vector with the offset.<br />
<br />
===HFlipped===<br />
Returns whether this MOSprite is being drawn flipped horizontally (along the vertical axis), or not.Whether flipped or not.<br />
<br />
===RotAngle===<br />
The current rotational angle of of this, in radians.The rotational angle of this, in radians.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.The angular velocity in radians per second.<br />
<br />
===Frame===<br />
Tells which frame is currently set to show.An unsigned int describing the current frame.<br />
<br />
===SpriteAnimMode===<br />
The animation mode currently in effect.<br />
<br />
"SpriteAnimMode = 1" is sequentially repeating.<br />
"SpriteAnimMode = 2" is random repeating.<br />
<br />
==Functions==<br />
===SetNextFrame===<br />
Hard-sets the frame this sprite is supposed to show, to the consecutive one after the current one. If currently the last fame is this will set it to the be the first, looping the animation.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether the animation looped or not with this setting.<br />
<br />
<br />
===IsTooFast===<br />
Indicates whether this MO is moving or rotating stupidly fast in a way that will screw up the simulation.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr this is eitehr moving or rotating too fast.<br />
<br />
<br />
===IsOnScenePoint===<br />
Indicates whether this' current graphical representation overlaps a point in absolute scene coordinates.<br />
<br />
'''Arguments:'''<br />
<br />
* The point in absolute scene coordinates.<br />
<br />
'''Return value:'''<br />
<br />
Whether this' graphical rep overlaps the scene point.<br />
<br />
<br />
===RotateOffset===<br />
Takes a vector which is offset from the center of this when not rotated or flipped, and then rotates and/or flips it to transform it into this' 'local space', if applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* A vector which is supposed to be offset from this' center when upright.<br />
<br />
'''Return value:'''<br />
<br />
The resulting vector whihch has been flipped and rotated as appropriate.<br />
<br />
<br />
===UnRotateOffset===<br />
Takes a vector which is offset from the center of this when not rotated or flipped, and then rotates and/or flips it to transform it into this' 'local space', but in REVERSE.<br />
<br />
'''Arguments:'''<br />
<br />
* A vector which is supposed to be offset from this' center when upright.<br />
<br />
'''Return value:'''<br />
<br />
The resulting vector whihch has been flipped and rotated as appropriate.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/Cortex_CommandCortex Command2013-04-09T03:48:44Z<p>Brendan: /* Factions */</p>
<hr />
<div>{{TOCleft}}<br />
<div align="center">[[Image:CCWebTile.png]]</div><br />
<br><br />
<br><br />
<br />
<br />
<br />
<br><br />
<br />
== About ==<br />
<br />
"In Cortex Command, you play as a prospector and explorer in a time where complete cybernetics and whole-body amputations are common practice. Your severed brain is able to control many different types of bodies remotely from its underground bunker: clones, robots, spaceships, defensive turrets, and so on.<br />
<br />
A typical scenario starts with a building phase where you get to construct your own bunker complex from scratch. Then you need to mine precious gold from the deformable pixel terrain in order to buy more and better ships, soldiers, weapons, digging tools, and deployable defenses. Use these assets to defend your disembodied brain and destroy or bankrupt your opponent!<br />
<br />
Control your team of remote bodies either directly or let the friendly AI do your bidding through real-time strategy elements built into the game. Play with up to four players in split screen -- 2 vs. 2 players, or all four cooperatively against the computer. Eventually, you can play the campaign missions together with friends..."<br />
<br />
<br />
Cortex Command is the flagship product of [http://www.datarealms.com/ Data Realms LLC], reaching 1.0 release in September 2012 after over eleven years in development. <br><br />
It is proprietary software made by a small indie game company in collaboration with its fan community.<br />
<br />
== Story ==<br />
<br />
Earth was over. <br />
<br />
Once peaceful, our world was awash in bloodshed, wracked by wars backed by holy men. It was humanity's darkest hour, and the boldest decisions were simply all we had left. <br />
<br />
Forged in the rush of war, a curious symbiosis between man and machine formed. Our numbers bleeding away, technology enabled the survivors to control robots and clones from safety. And in the end, we found our bodies an obsolete constraint, and cast them off. Brain and mind interfaced with machines, we became more spirit than flesh-- one person living through many bodies. <br />
<br />
And in this new form we attained escape from the corpse of our world. Interstellar rocket ships for the decades-long flights to reach new worlds became common once life support for entire bodies was unnecessary. <br />
<br />
Fleeing into the dark unknown, humanity discovered it was not alone, but also not important. Humanity struggled for acceptance in this alien community, eventually forging the Orion Spur Amalgam. Interstellar trade flourished, and with it came rapid expansion. As the era of faster-than-light dawned, humanity could live again in peace and prosperity. <br />
<br />
But human nature wasn't cast off as easily. For every city and space station compounded the ever-growing hunger for resources. Worlds were stripped in civilized sectors where law ensured conquest by the highest bidder. So all eyes turned outward, to star systems where no law existed but what you could enforce. <br />
<br />
As the gold rush brings commanders from several rival groups to one such world beyond the far eastern fringes of the OSA, all prepare to assume... '''Cortex Command'''.<br />
<br />
== [[Tech | Techs]] ==<br />
''Note: Techs replaced Factions in Build 27.''<br />
Techs are distinct groups with their own sets of units, [[Weapons | weapons]], [[Tools | tools]], [[Bombs | bombs]], and even vehicles, as well as access to Free Trade products. The player acts as a kind of local commander or franchisee of one of the Techs competing with the others. Cost to buy from Techs other than your own are four times the in-Tech price.<br />
<br />
=== ''[[Free Trade]]'' ===<br />
<br />
''This is the "default tech". Items sold by Free Trade will be in the top-level of the Buy Menu not under a Tech heading. You cannot campaign as Free Trade, nor are they part of skirmishes.''<br />
<br />
Free Trade is a super corporation which owns and operates TradeStars, including TradeStar Midas which transports everything you purchase in the Buy Menu. They also sell a few units and [[Weapons | weapons]] of their own as well as most all the [[Tools | tools]] available.<br />
<br />
=== [[Coalition]] ===<br />
<br />
A militarized organization, the Coalition produce a large array of units and weaponry to choose from. They are versatile and powerful, making them a strong ally or a dangerous foe.<br />
<br />
=== [[Dummy]] ===<br />
<br />
These robots were originally designed as test subjects for weapons, vehicle safety measures, and other lethal experiments, but an AI controller became sentient and broke off from its manufacturers, starting a new line of robots and weapons to defend itself.<br />
<br />
=== [[Ronin]] ===<br />
<br />
Rag-tag parties of bandits who prey on weak and unsuspecting explorers. Their soldiers are unarmored and weapons primitive, but they manage to get the job done.<br />
<br />
=== [[Browncoat]] ===<br />
<br />
A strong mercenary group who are fearsome when confronted up-close. What they lack in range is made up for in durability, allowing them to close distances while soaking bullets.<br />
<br />
=== [[Imperatus]] ===<br />
<br />
The Imperatus rely on pure brute force and the reliability of their sturdy and easy to produce armored units. They use simple low rate of fire guns and cannons which tirelessly deals out good damage.<br />
<br />
=== [[Techion]] ===<br />
<br />
An elite faction formed by a few high-tech corporations. They focus on expensive units and exotic weaponry, and have the distinction of being selected by [[Free Trade]] to occassionally provide security for TradeStar activities.<br />
<br />
== Factions ==<br />
<br />
The '''Techs''' above were formerly called "Factions" and included with the entries below. After nearly a decade in development, Cortex Command shifted away from the planned storyline campaign to a more PvP or PvC mulitplayer battle campaign.<br />
<br />
Almost all the Factions which did not become Techs exist only in the lore and storyline "fluff" on [http://www.AndroidArts.com/cortexcommand AndroidArts.com]. <br />
<br />
Wildlife are the only Faction implemented in-game, and the Undead were absorbed into the base Free Trade offerings.<br />
<br />
<br />
'''[[Wildlife]]'''<br />
<br />
The critters that inhabit the gold-rich planet you're on, primarily crabs. Unfortunately for them, your fighting and mining is killing them and is laying waste to their planet. <br><br />
Following a mass extinction event, crabs comprise almost all animal life on the planet, while a bulbous kind of plant is the dominant vegetation.<br />
<br />
<br />
'''[[Free_Trade#Culled_Clones | Undead]]'''<br />
<br />
Became "Culled Clone" units sold by [[Free Trade]] as of Build 27. <br />
<br />
Consisting of walking Skeletons and "Zombie" half-baked clones armed with archaic blunderbuss weapons and a dead simple grenade, the Undead are weak, cheap, and meant to be effective only in large numbers. They are some of the only infantry without jetpacks.<br />
<br />
They formerly were a faction first encountered in a "Zombie Cave" mission also featuring a [[Ronin]] hit squad. They were most likely intended to be in the forces of [[Uzira]], but she was never implemented.<br />
<br />
<br />
'''Green Dummies'''<br />
<br />
Largely identical to the familiar [[Dummy | orange Dummies]], these cheap general purpose labor robots were meant to be the player's starting units in the Tutorial Mission. They are what the Dummy forces were before their [[Dummy#Dummy_Controller | AI control unit]] became sentient and split off from its human masters. <br />
<br />
It's unclear whether Green Dummies would still be for sale by [[TradeStar]].<br />
<br />
<br />
'''[[Mu-ilaak | Remnants of Mu-ilaak]]'''<br />
<br />
Alien robots of unknown age and origin, they were intended as the big-bad of Cortex Command's planned story mode. Dormant on the planet's moon, stranded after a battle in the distant past with human explorer [[Uzira]], the Mu-ilaak awaken to wreak havoc using an apparent ability to convert organic (and possibly robotic) enemies into cyborg drones.<br />
<br />
<br />
'''[[Uzira]]'''<br />
<br />
An early human explorer far into unknown space, Uzira was intended as the heroic ally of the planned story mode. Uzira's team ran into the ancient and hostile [[Mu-ilaak]]. Their battles left both sides exhausted and stranded on this planet's moon. Her troops are skeletons, sometimes with elaborate armor, and armed with blunderbuss-shaped weapons.<br />
<br />
<br />
'''[[Alchiral]]'''<br />
<br />
Alchiral is one of the largest manufacturers of organic human bodies. Most or all TradeStars in sectors with human populations carry a compliment of Alchiral VAT arrays. The technology is under strict control by Alchiral's overseers to ensure that their monopoly is maintained.<br />
<br />
<br />
'''Aliens'''<br />
<br />
Aliens, sure; you really can't tell what species the brain is can you? You might be a Zxolophlox controlling those human bodies, because human bodies makes nice organic meat puppets. The opening cinematic briefly shows various alien lifeforms that might have been integrated into the game.<br />
<br />
== [[Modding]] ==<br />
Cortex Command uses a simple variable-base object designing system to allow modders to create their own entities, along with lua for more complex features. Modding is easy to learn for Cortex Command, and currently there are many mods being released every day. Released mods may range from serious and realistic to fun and silly.<br />
<br />
<br />
To find and download mods, you can go to [http://www.datarealms.com/forum/ Mod Releases].<br><br />
For help installing mods, you can go to [http://forums.datarealms.com/viewtopic.php?f=61&t=10652 How to install mods].<br />
<br />
== History ==<br />
The first recorded development of Cortex Command started on the 22nd February 2001, and was originally called D.I.R.T, by Daniel Tabar (a.k.a. DaTa, or Data), and a working alpha was released publicly some years later. Since then "Cortex Command" has gone through numerous changes and updates.<br />
<br />
As the game carried on DaTa realized that he wasn't exactly the best artist and sought the help of [http://www.itchstudios.com/psg/ Promster] (a.k.a. Prometheus). Promster's graphical changes were implemented on the 27th of July, 2004 and gave Cortex Command the graphical style that it is now known for.<br />
<br />
In 2008, he contracted several members of the community to do work for the game. These contributors included '''capnbubs''', '''TheLastBanana''' and '''numgun'''. Following a huge amount of community support, '''CaveCricket48''' was included onto the team, shortly followed by '''Lizardheim''', and '''Abdul Alhazred'''.<br />
<br />
The time lapse between public releases has occasionally been extensive, and it was for this reason, amongst other things, that the developer '''numgun''' left the team, and indeed the community. There was a gap of two years between builds 23 and 24, which was due to a lack of dedication from Data himself, and between those builds it was felt very much by the community that not enough had been accomplished. Following the release of build 24, Data improved his relations with the fans, and gave regular updates via his [http://twitter.com/#!/DataRealms/ Twitter Updates]. Very quickly build 25 was released, which was, by all accounts, a rousing success.<br />
<br />
Build 27, the last public testing release before the full version of the game, incorporated a nearly fully working campaign, and de-activated the ability to injure team-mates, amongst other modding tools.<br />
<br />
Release 1.0 was made in September 2012. It implemented all six Techs ([[Coalition]], [[Dummy|Dummies]], [[Ronin]], [[Browncoat|Browncoats]], [[Imperatus]], and [[Techion]]) in a working Campaign mode. Story mode was scraped with remnants of early stages as Mission Activities.<br />
<br />
The project has been in development for eleven and a half years. It has been submitted to the [http://en.wikipedia.org/wiki/Independent_Games_Festival Independent Games Festival] four times, and the forth time it won two awards; one for technical excellence and the other an audience award.<br />
Cortex Command has a feature on the [http://www.greatgamesexperiment.com/game/cortexcommand/?utm_source=gge&utm_medium=badge_user Great Games Experiment], and was featured in [http://www.playmagazine.com/ Play] magazine. It was also one of the prestigious [http://www.humblebundle.com Humble Indie Bundles], where it was widely well received.</div>Brendanhttps://wiki.datarealms.com/ShieldsShields2013-02-11T06:51:55Z<p>Brendan: More stuff</p>
<hr />
<div>Shields are an AddToGroup for [[HeldDevice]]s which equips them to the background arm (off-hand) of an [[AHuman]]. It is also possible to mount a HeldDevice (like the Riot Shield) to the Turret of an [[ACrab]] Actor, though ACrabs can't cycle inventory, meaning it would only ever have that shield. Good if you're feeling extra defensive.<br />
<br />
Currently there is only one shield in the game. However, the category has proven useful for modders.<br />
<br />
== [[Free Trade]] ==<br />
<br />
=== Riot Shield ===<br />
[[Image:Riot_Shield--4X.png]]<br />
* Tech: [[Free Trade]]<br />
* Gold Value: 15<br />
* Mass: 8<br />
* Description: "This metal shield provides excellent additional frontal protection to the user and it can stop numerous hits before breaking up." <br><br />
Able to stand up to a barrage about as well as a "heavy infantry" classed [[Actors | Actor]], the Riot Shield leaves a bit of exposure. It is best to stay low to the ground when hiding behind the shield.<br />
<br />
<br />
== Off-hand Weapons ==<br />
Although currently only used by Cortex Command for the TradeStar Riot Shield, "AddToGroup = Shields" has been used by the mod community to create “off-handed” [[HDFirearm]]s the background arm can operate, something normally only the foreground arm can do. <br />
<br />
=== Implementation ===<br />
Here is a basic example of the correct coding for an "off-handed" weapon.<br />
<pre><br />
AddDevice = HDFirearm<br />
PresetName = <<Weapon Name Here>><br />
AddToGroup = Shields<br />
<<...and all the rest of the required data...>><br />
</pre><br />
<br />
In short, it's a valid AddDevice declaration added to the Shields group; and despite being a HDFirearm, it isn't added to the Weapons group or Tools group. <br />
<br />
In managing multiple versions (on-hand and off-hand, variant models) of the same gun, there are complications to using CopyOf to avoid having multiple independent copies to update as you modify things you want to be the same in all the weapons. CopyOf declarations can only be successfully off-handed if the Device they copy was successfully off-handed. It's something like keeping a royal bloodline. <br />
<br />
Altogether, there are two main rules, each with consequence for any AddDevice that is a CopyOf.<br />
* Must have "AddToGroup = Shields"<br />
** Cannot be a CopyOf any AddDevice which didn't have "AddToGroup = Shields"<br />
* Must not have "AddToGroup = Weapons" or "AddToGroup = Tools"<br />
** Cannot be a CopyOf any AddDevice which did have "AddToGroup = Weapons" or "AddToGroup = Tools"<br />
<br />
=== Operation ===<br />
An off-handed HDFirearm will fire when used with any other HDFirearm which is defined with "OneHanded = 1" or even a TDExplosive defined likewise. It will also fire when the Device in the foreground arm is dropped, though in general an off-hand weapon will equip to the foreground arm when no other OneHanded Device is in the Actor's inventory.<br />
<br />
A [[TDExplosive]] can also be offhanded. However, an offhanded TDExplosive will not be thrown even when the foreground arm is using another TDExplosive and both are defined with “OneHanded = 1”. But it will not appear in the Buy menu in-game, only in the Build menu. The Shields section seems to accept only HeldDevices, not ThrownDevices.<br><br />
However, a OneHanded TDExplosive can be thrown normally when paired with an offhanded HDFirearm (or a normal Shield), which will fire while the throw is being "charged up" by holding your fire button.<br />
<br />
Finally, a HeldDevice can be “on-handed” with an off-hand HDFirearm (or TDExplosive, though it will be inoperable) by making a Shield be OneHanded and getting it equipped to the foreground arm. The result is a confused southpaw riot cop lacking the SharpLength aiming the HDFirearm provides and the foreground arm holding the shield closer than usual providing less cover for the gun. It’s certainly creative.<br />
<br />
Cycling off-hand Devices into the on-hand can be done by putting an AHuman into a crawl first, temporarily emptying the background hand into the normal inventory for the on-hand.</div>Brendanhttps://wiki.datarealms.com/ShieldsShields2013-02-11T05:49:50Z<p>Brendan: Eh, work</p>
<hr />
<div>Shields are a category of [[HeldDevice]] items equipped to the background arm (offhand) of an [[AHuman]]. Shields don't properly equip to [[ACrab]] actors.<br />
<br />
Currently there is only one shield in the game. However, the category has proven useful for modders.<br />
<br />
== [[Free Trade]] ==<br />
<br />
=== Riot Shield ===<br />
[[Image:Riot_Shield--4X.png]]<br />
* Tech: [[Free Trade]]<br />
* Gold Value: 15<br />
* Mass: 8<br />
* Description: "This metal shield provides excellent additional frontal protection to the user and it can stop numerous hits before breaking up." <br><br />
Able to stand up to a barrage about as well as a "heavy infantry" classed [[Actors | Actor]], the Riot Shield leaves a bit of exposure. It is best to stay low to the ground when hiding behind the shield.<br />
<br />
<br />
== Off-hand Weapons ==<br />
Although currently only used by Cortex Command for the TradeStar Riot Shield, "AddToGroup = Shields" has been used by the mod community to create “off-handed” [[HDFirearm]]s the background arm can operate, something normally only the foreground arm can do. <br />
<br />
=== Implementation ===<br />
Here is a basic example of the correct coding for an "off-handed" weapon.<br />
<pre><br />
AddDevice = HDFirearm<br />
PresetName = <<Weapon Name Here>><br />
AddToGroup = Shields<br />
<<...and all the rest of the required data...>><br />
</pre><br />
<br />
In short, it's a valid AddDevice declaration added to the Shields group; and despite being a HDFirearm, it isn't added to the Weapons group or Tools group. <br />
<br />
In managing multiple versions (on-hand and off-hand, variant models) of the same gun, there are complications to using CopyOf to avoid having multiple independent copies to update as you modify things you want to be the same in all the weapons. CopyOf declarations can only be successfully off-handed if the Device they copy was successfully off-handed. It's something like keeping a royal bloodline. <br />
<br />
Altogether, there are two main rules, each with consequence for any AddDevice that is a CopyOf.<br />
* Must have "AddToGroup = Shields"<br />
** Cannot be a CopyOf any AddDevice which didn't have "AddToGroup = Shields"<br />
* Must not have "AddToGroup = Weapons" or "AddToGroup = Tools"<br />
** Cannot be a CopyOf any AddDevice which did have "AddToGroup = Weapons" or "AddToGroup = Tools"<br />
<br />
=== Operation ===<br />
An off-handed HDFirearm will fire when used with any other HDFirearm which is defined with "OneHanded = 1" or even a TDExplosive defined likewise. It will also fire when the Device in the foreground arm is dropped, though in general an off-hand weapon will equip to the foreground arm when no other OneHanded Device is in the Actor's inventory.<br />
<br />
A [[TDExplosive]] can also be offhanded. However, an offhanded TDExplosive will not be thrown even when the foreground arm is using another TDExplosive and both are defined with “OneHanded = 1”. But it will not appear in the Buy menu in-game, only in the Build menu. The Shields section seems to accept only HeldDevices, not ThrownDevices.<br><br />
However, a OneHanded TDExplosive can be thrown normally when paired with an offhanded HDFirearm (or a normal Shield), which will fire while the throw is being "charged up" by holding your fire button.<br />
<br />
Finally, a HeldDevice can be “on-handed” with an off-hand HDFirearm (or TDExplosive, though it will be inoperable) by making a Shield be OneHanded and getting it equipped to the foreground arm. The result is a confused southpaw riot cop lacking the SharpLength aiming the HDFirearm provides and the foreground arm holding the shield closer than usual providing less cover for the gun. It’s certainly creative.<br />
<br />
Cycling off-hand Devices into the on-hand can be done by putting an AHuman into a crawl first, temporarily emptying the background hand into the normal inventory for the on-hand.</div>Brendanhttps://wiki.datarealms.com/ShieldsShields2013-02-10T17:20:23Z<p>Brendan: A little more detail.</p>
<hr />
<div>Shields are a category of [[HeldDevice]] items equipped to the background arm (offhand) of an [[AHuman]]. Shields don't properly equip to [[ACrab]] actors.<br />
<br />
Currently there is only one shield in the game. However, the category has proven useful for modders.<br />
<br />
== [[Free Trade]] ==<br />
<br />
=== Riot Shield ===<br />
[[Image:Riot_Shield--4X.png]]<br />
* Tech: [[Free Trade]]<br />
* Gold Value: 15<br />
* Mass: 8<br />
* Description: "This metal shield provides excellent additional frontal protection to the user and it can stop numerous hits before breaking up." <br><br />
Able to stand up to a barrage about as well as a "heavy infantry" classed [[Actors | Actor]], the Riot Shield leaves a bit of exposure. It is best to stay low to the ground when hiding behind the shield.<br />
<br />
<br />
== Off-hand Weapons ==<br />
Although currently only used by Cortex Command for the TradeStar Riot Shield, "AddToGroup = Shields" has been used by the mod community to create “off-handed” [[HDFirearm]]s the background arm can operate, something normally only the foreground arm can do. <br />
<br />
=== Implementation ===<br />
Here is a basic example of the correct coding for an "off-handed" weapon.<br />
<pre><br />
AddDevice = HDFirearm<br />
PresetName = <Weapon Name Here><br />
AddToGroup = Shields<br />
<...and all the rest of the required data...><br />
</pre><br />
<br />
The essence is that it's a valid AddDevice declaration added to the Shields group but isn't a simple HeldDevice; and despite being a HDFirearm, it isn't added to the Weapons group. <br><br />
CopyOf declarations can only be off-handed if the Device they copy was successfully off-handed. It's something like keeping a royal bloodline pure.<br />
<br />
Altogether, there are two main rules, each with consequence for any AddDevice that is a CopyOf.<br />
* Must have "AddToGroup = Shields"<br />
** Cannot be a CopyOf any AddDevice which didn't have "AddToGroup = Shields"<br />
* Must not have "AddToGroup = Weapons"<br />
** Cannot be a CopyOf any AddDevice which did have "AddToGroup = Weapons"<br />
<br />
Basically, the Shield group pushes any type of HeldDevice or ThrownDevice to the background arm, but only if included in the original declaration. The Weapons group forces the default behavior for Devices of equipping to the foreground arm.<br />
<br />
Note: '''AI does not understand off-handed weapons.''' Without a normal one-handed HDFirearm or TDExplosive equipped to the foreground arm, the AI will not fire at all. There is, however, a [http://forums.datarealms.com/viewtopic.php?f=1&t=14033&p=262321&hilit=unique+gib#p262321 workaround].<br />
<br />
=== Operation ===<br />
An off-handed HDFirearm will fire when used with any other HDFirearm which is defined with "OneHanded = 1" or even a TDExplosive defined likewise. It will also fire when the Device in the foreground arm is dropped, though in general an off-hand weapon will equip to the foreground arm when no other OneHanded Device is in the Actor's inventory.<br />
<br />
A [[TDExplosive]] can also be offhanded. However, an offhanded TDExplosive will not be thrown even when the foreground arm is using another TDExplosive and both are defined with “OneHanded = 1”. But it will not appear in the Buy menu in-game, only in the Build menu. The Shields section seems to accept only HeldDevices, not ThrownDevices.<br><br />
However, a OneHanded TDExplosive can be thrown normally when paired with an offhanded HDFirearm (or a normal Shield), which will fire while the throw is being "charged up" by holding your fire button.<br />
<br />
Finally, a HeldDevice can be “on-handed” with an off-hand HDFirearm (or TDExplosive, though it will be inoperable) by making a Shield be OneHanded and getting it equipped to the foreground arm. The result is a confused southpaw riot cop lacking the SharpLength aiming the HDFirearm provides and the foreground arm holding the shield closer than usual providing less cover for the gun. It’s certainly creative.<br />
<br />
Cycling off-hand Devices into the on-hand can be done by putting an AHuman into a crawl first, temporarily emptying the background hand into the normal inventory for the on-hand.</div>Brendanhttps://wiki.datarealms.com/ShieldsShields2013-02-10T17:15:44Z<p>Brendan: Totally reworked the Off-hand section with research findings.</p>
<hr />
<div>Shields are a category of [[HeldDevice]] items equipped to the background arm (offhand) of an [[AHuman]]. Shields don't properly equip to [[ACrab]] actors.<br />
<br />
Currently there is only one shield in the game. However, the category has proven useful for modders.<br />
<br />
== [[Free Trade]] ==<br />
<br />
=== Riot Shield ===<br />
[[Image:Riot_Shield--4X.png]]<br />
* Tech: [[Free Trade]]<br />
* Gold Value: 15<br />
* Mass: 8<br />
* Description: "This metal shield provides excellent additional frontal protection to the user and it can stop numerous hits before breaking up." <br><br />
Able to stand up to a barrage about as well as a "heavy infantry" classed [[Actors | Actor]], the Riot Shield leaves a bit of exposure. It is best to stay low to the ground when hiding behind the shield.<br />
<br />
<br />
== Off-hand Weapons ==<br />
Although currently only used by Cortex Command for the TradeStar Riot Shield, "AddToGroup = Shields" has been used by the mod community to create “off-handed” [[HDFirearm]]s the background arm can operate, something normally only the foreground arm can do. <br />
<br />
=== Implementation ===<br />
Here is a basic example of the correct coding for an "off-handed" weapon.<br />
<pre><br />
AddDevice = HDFirearm<br />
PresetName = <Weapon Name Here><br />
AddToGroup = Shields<br />
<...and all the rest of the required data...><br />
</pre><br />
<br />
The essence is that it's a valid AddDevice declaration added to the Shields group but isn't a simple HeldDevice; and despite being a HDFirearm, it isn't added to the Weapons group. <br><br />
CopyOf declarations can only be off-handed if the Device they copy was successfully off-handed. It's something like keeping a royal bloodline pure.<br />
<br />
Altogether, there are two main rules, each with consequence for any AddDevice that is a CopyOf.<br />
* Must have "AddToGroup = Shields"<br />
** Cannot be a CopyOf any AddDevice which didn't have "AddToGroup = Shields"<br />
* Must not have "AddToGroup = Weapons"<br />
** Cannot be a CopyOf any AddDevice which did have "AddToGroup = Weapons"<br />
<br />
Note: '''AI does not understand off-handed weapons.''' Without a normal one-handed HDFirearm or TDExplosive equipped to the foreground arm, the AI will not fire at all. There is, however, a [http://forums.datarealms.com/viewtopic.php?f=1&t=14033&p=262321&hilit=unique+gib#p262321 workaround].<br />
<br />
=== Operation ===<br />
An off-handed HDFirearm will fire when used with any other HDFirearm which is defined with "OneHanded = 1" or even a TDExplosive defined likewise. It will also fire when the Device in the foreground arm is dropped, though in general an off-hand weapon will equip to the foreground arm when no other OneHanded Device is in the Actor's inventory.<br />
<br />
A [[TDExplosive]] can also be offhanded. However, an offhanded TDExplosive will not be thrown even when the foreground arm is using another TDExplosive and both are defined with “OneHanded = 1”. But it will not appear in the Buy menu in-game, only in the Build menu. The Shields section seems to accept only HeldDevices, not ThrownDevices.<br><br />
However, a OneHanded TDExplosive can be thrown normally when paired with an offhanded HDFirearm (or a normal Shield), which will fire while the throw is being "charged up" by holding your fire button.<br />
<br />
Finally, a HeldDevice can be “on-handed” with an off-hand HDFirearm (or TDExplosive, though it will be inoperable) by making a Shield be OneHanded and getting it equipped to the foreground arm. The result is a confused southpaw riot cop lacking the SharpLength aiming the HDFirearm provides and the foreground arm holding the shield closer than usual providing less cover for the gun. It’s certainly creative.<br />
<br />
Cycling off-hand Devices into the on-hand can be done by putting an AHuman into a crawl first, temporarily emptying the background hand into the normal inventory for the on-hand.</div>Brendanhttps://wiki.datarealms.com/DevicesDevices2013-02-10T10:48:13Z<p>Brendan: Research findings</p>
<hr />
<div>A general class for game objects that can be held by any [[AHuman]] actor or by a Turret on an [[ACrab]]. They can take a variety of forms.<br />
<br />
== HDFirearm ==<br />
'''Main Article: [[HDFirearm]]'''<br />
<br />
<br />
[[Image:Pistol--4X.png]] &nbsp; [[Image:Shovel--4X.png]] &nbsp; [[File:Medium_Scanner--4X.png]] &nbsp; [[Image:Detonator--4X.png]] &nbsp; [[File:Repeller_Gun--4X.png]]<br />
<br />
A concatenated abbreviation of "Held Device" and "Firearm", these generally are [[Weapons | weapons]], but are also [[Tools | tools]] such as diggers, scanners, detonators, sprayers, and some other exotic devices. An HDFirearm is anything which needs to be triggered by an Actor at the right time and place for the situation. By default all have unlimited reloads except those with infinite ammo. Technically all have rounds contained in magazines, shells ejected, and muzzle flash, but sometimes they're only technicalities.<br />
<br />
== TDExplosive ==<br />
'''Main Article: [[TDExplosive]]'''<br />
<br />
<br />
[[Image:Frag_Grenade--4X.png]] &nbsp; [[Image:Remote_Explosive--4X.png]] &nbsp; [[Image:Anti_Personnel_Mine--4X.png]] &nbsp; [[Image:Standard_Bomb--4X.png]]<br />
<br />
A "Thrown Device" "Explosive" is used for grenades, explosive shells, mines, "Dropship ONLY" bombs-- even a thrown stone. The TDExplosive is anything you want triggered to "gib" at a later time and usually a different place than when and where it was thrown (or fired from a HDFirearm). The trigger is generally det-on-impact or a reasonable time delay, though some are unreasonably long timers so detonators can be used remotely. They can only be thrown by [[AHuman | AHumans]] who have a foreground arm. The speed and thus distance can be controlled by charging up the throw and a parabolic arc makes it easy to throw over/around cover. TDExplosives, unlike a HDFirearm's Magazine, do not reload; once gibbed, it's gone.<br />
<br />
== HeldDevice ==<br />
'''Main Article: [[HeldDevice]]'''<br />
<br />
[[Image:Riot_Shield--4X.png]]<br />
<br />
Generically named and currently only used for [[Shields | shields]], a HeldDevice is equipped to an [[AHuman]]'s background arm, unless they have equipped an HDFirearm which requires two hands or a TDExplosive. The HeldDevice is not known to be useable by [[ACrab]] Actors.<br />
<br />
''Note: The Buy menu AddToGroup for Shields can be used to make a HDFirearm with "OneHanded = 1" be used as an offhand weapon by having "AddToGroup = Shields" as the only AddToGroup used in an AddDevice declaration which is '''not''' a CopyOf.'' <br><br />
''This is also true for a TDExplosive, but the offhanded TDExplosive will not be thrown and also will only be shown by the Build menu, not the in-game Buy menu. OneHanded non-Shield bombs can be thrown while holding a Shield or firing an "offhanded" HDFirearm.''<br />
<br />
<br />
<br />
[[Category: Modding]]<br />
{{Stub}}</div>Brendanhttps://wiki.datarealms.com/DevicesDevices2013-02-10T05:23:19Z<p>Brendan: Revamping</p>
<hr />
<div>A general class for game objects that can be held by any [[AHuman]] actor or by a Turret on an [[ACrab]]. They can take a variety of forms.<br />
<br />
== HDFirearm ==<br />
'''Main Article: [[HDFirearm]]'''<br />
<br />
<br />
[[Image:Pistol--4X.png]] &nbsp; [[Image:Shovel--4X.png]] &nbsp; [[File:Medium_Scanner--4X.png]] &nbsp; [[Image:Detonator--4X.png]] &nbsp; [[File:Repeller_Gun--4X.png]]<br />
<br />
A concatenated abbreviation of "Held Device" and "Firearm", these generally are [[Weapons | weapons]], but are also [[Tools | tools]] such as diggers, scanners, detonators, sprayers, and some other exotic devices. An HDFirearm is anything which needs to be triggered by an Actor at the right time and place for the situation. By default all have unlimited reloads except those with infinite ammo. Technically all have rounds contained in magazines, shells ejected, and muzzle flash, but sometimes they're only technicalities.<br />
<br />
== TDExplosive ==<br />
'''Main Article: [[TDExplosive]]'''<br />
<br />
<br />
[[Image:Frag_Grenade--4X.png]] &nbsp; [[Image:Remote_Explosive--4X.png]] &nbsp; [[Image:Anti_Personnel_Mine--4X.png]] &nbsp; [[Image:Standard_Bomb--4X.png]]<br />
<br />
A "Thrown Device" "Explosive" is used for grenades, explosive shells, mines, "Dropship ONLY" bombs-- even a thrown stone. The TDExplosive is anything you want triggered to "gib" at a later time and usually a different place than when and where it was thrown (or fired from a HDFirearm). The trigger is generally det-on-impact or a reasonable time delay, though some are unreasonably long timers so detonators can be used remotely. They can only be thrown by [[AHuman | AHumans]] who have a foreground arm. The speed and thus distance can be controlled by charging up the throw and a parabolic arc makes it easy to throw over/around cover. TDExplosives, unlike a HDFirearm's Magazine, do not reload; once gibbed, it's gone.<br />
<br />
== HeldDevice ==<br />
'''Main Article: [[HeldDevice]]'''<br />
<br />
[[Image:Riot_Shield--4X.png]]<br />
<br />
Generically named and currently only used for [[Shields | shields]], a HeldDevice is equipped to an [[AHuman]]'s background arm, unless they have equipped an HDFirearm which requires two hands or a TDExplosive. The HeldDevice is not known to be useable by [[ACrab]] Turrets<br />
<br />
''Note: unrelated to HeldDevice, "AddToGroup = Shields" can be abused to equip other Devices to the background arm.''<br />
<br />
<br />
<br />
[[Category: Modding]]<br />
{{Stub}}</div>Brendanhttps://wiki.datarealms.com/DevicesDevices2013-02-10T04:56:05Z<p>Brendan: So, turns out "analgram" isn't a word. I'm kinda glad.</p>
<hr />
<div>A general class for game objects that can be held by any [[AHuman]] actor or by a Turret on an [[ACrab]]. They can take a variety of forms.<br />
<br />
== HDFirearm ==<br />
'''Main Article: [[HDFirearm]]'''<br />
<br />
<br />
[[Image:Pistol--4X.png]] &nbsp; [[Image:Shovel--4X.png]] &nbsp; [[File:Medium_Scanner--4X.png]] &nbsp; [[Image:Detonator--4X.png]] &nbsp; [[File:Repeller_Gun--4X.png]]<br />
<br />
A concatenated abbreviation of "Held Device" and "Firearm", these generally are [[Weapons | weapons]], but are also [[Tools | tools]] such as diggers, scanners, detonators, sprayers, and some other exotic devices. An HDFirearm is anything which needs to be triggered by an Actor at the right time and place for the situation. By default all have unlimited reloads except those with infinite ammo. Technically all have rounds contained in magazines, shells ejected, and muzzle flash, but sometimes they're only technicalities.<br />
<br />
== TDExplosive ==<br />
'''Main Article: [[TDExplosive]]'''<br />
<br />
<br />
[[Image:Frag_Grenade--4X.png]] &nbsp; [[Image:Remote_Explosive--4X.png]] &nbsp; [[Image:Anti_Personnel_Mine--4X.png]] &nbsp; [[Image:Standard_Bomb--4X.png]]<br />
<br />
A "Thrown Device" "Explosive" is used for grenades, explosive shells, mines, "Dropship ONLY" bombs-- even a thrown stone. The TDExplosive is anything you want triggered at a later time in a different place than the Actor who deployed it, or just thrown. This is almost always an explosion on impact or else a reasonable trigger delay; though some are unreasonable so detonators can be used. TDExplosives are finite compared to the HDFirearm as the device is lost once thrown. The advantage over a grenade launcher is control over the speed of the throw, thus distance, and not needing as straight a line to your target.<br />
<br />
== HeldDevice ==<br />
'''Main Article: [[HeldDevice]]'''<br />
<br />
[[Image:Riot_Shield--4X.png]]<br />
<br />
Generically named and currently only used for [[Shields | shields]], a HeldDevice is equipped to an [[AHuman]]'s background arm, unless they have equipped an HDFirearm which requires two hands or a TDExplosive. The HeldDevice is not known to be useable by [[ACrab]] Turrets<br />
<br />
''Note: unrelated to HeldDevice, "AddToGroup = Shields" can be abused to equip other Devices to the background arm.''<br />
<br />
<br />
<br />
[[Category: Modding]]<br />
{{Stub}}</div>Brendanhttps://wiki.datarealms.com/CortexWiki:To-Do_ListCortexWiki:To-Do List2013-02-10T04:51:46Z<p>Brendan: </p>
<hr />
<div>*'''Expand the wiki.'''<br />
*Add variables and descriptions to: [[List of Cortex Variables Defined]].<br />
*Fix and add content to [[Jetpack]]: add links to relevant material, information/description, and a picture.<br />
*Add content to [[Scenes]]: add relevant links and an appropriate picture.<br />
*Add content to [[Devices]]: links to relevant material, description, and a picture.<br />
*Add content to [[Wounds]]: links to relevant material, description, and a picture.<br />
*Add appropriate Lua links to pages. Ex: In [[AHuman]], include link to [[LuaDocs/AHuman]].<br />
*Split out bug fixing/troubleshooting information, and create troubleshooting pages/category. Ex: [[AHuman]] should include a link to [[Troubleshooting/AHuman]].<br />
*Add content to [[AEmitter]].<br />
*Many [[Lua]] functions need descriptions and/or examples.<br />
*Check that all pages in [[Tutorials]] category are in fact tutorials, and not just explanations.<br />
*Create page for [[ThrownDevice]]. See if there's any examples besides its child class TDExplosive.<br />
*Re-write [[Activities.ini]] to describe current/recent Activities and Scenario Battle setup<br />
** Probably needs to be moved to a page name without the ".ini" part too.<br />
<br />
Remember, just because it is not on the To-Do list, that doesn't mean a page can't be improved, created, or updated.</div>Brendanhttps://wiki.datarealms.com/Activities.iniActivities.ini2013-02-10T04:49:03Z<p>Brendan: </p>
<hr />
<div>''' NOTE: This describes the old Activities setup prior to release (1.0) and recent beta builds (B27, B26...). PAGE IS IN NEED OF A REWRITE. '''<br />
<br />
Activities.ini is the file in the vanilla Missions.rte that tells the game what files to use to attack the player. It can be edited to give the enemies stronger weapons, troops or crafts. Activities.ini files can also be loaded from other modules (though only the first loaded Skirmish Activities will be used in game) in order to use the assets in that module. Activities.ini need not be called Activities.ini, for example, the vanilla activities are split into "Mission Activities" and "Skirmish Activities".<br />
<br />
==Without Changing Index.ini==<br />
Alrighty, so you have a mod and you want to fight against it. That is entirely possible for anyone, you need not have any great skill in coding.<br />
<br />
There is one gigantic rule you must remember and follow. You cannot, under any circumstances, call (make a reference to) an actor, weapon, craft, or whatever, without first loading it. This means, somewhere along your logic chain, that you must have "IncludeFile = Mod.rte/Actor.ini" before you call "AddInventory = AHuman CopyOf = Actor".<br />
<br />
Now, for purposes of this article we will be using a mod called simply "Mod.rte". Replace the word "Mod.rte" in this tutorial with your chosen mod, such as "AAL.rte" or "Kloveska.rte", though most mods nowadays already have activities packaged with them.<br />
<br />
To begin, let's go through how to enable a pre-made activities.ini packaged with a mod.<br />
<br />
Part one, you want to disable the basegame activities. This has been made easier in Build 23, simply put "//" before the IncludeFile line in Missions.rte/Index.ini referring to "Skirmish Activities.ini"<br />
<br />
Now, part two. This may not be necessary, but check in your Mod.rte/Index.ini for an IncludeFile line for its Activities.ini. It may be commented out (a "//" to the left of the IncludeFile line). If it is, uncomment it (remove the "//"). This will enable the mod activities, and you're done.<br />
<br />
Now we're going to be creating our own Activities.ini for mods that do not include them.<br />
For starters, disable the basegame activites as described above. Then, copy Missions.rte/Activities.ini, and paste it into "Mod.rte". Before we do anything more, add a line to Mod.rte/Index.ini including the new activities.ini. This should look something like "IncludeFile = Mod.rte/Activities.ini".<br />
To begin to modify your new activities, remove all the " AddAttackerSpawn = ACDropShip" or "AddAttackerSpawn = ACRocket" blocks. You are going to replace them with the mod's parts. So, your file should look something like this when you're done.<br />
<br />
<pre><br />
AddActivity = GABaseDefense<br />
PresetName = Skirmish Defense<br />
SceneName = Grasslands<br />
TeamCount = 2<br />
PlayerCount = 1<br />
TeamOfPlayer1 = 0<br />
TeamOfPlayer2 = 1<br />
FundsOfTeam1 = 10000<br />
FundsOfTeam2 = 10000<br />
CPUTeam = 1<br />
Difficulty = 3<br />
SpawnIntervalEasiest = 20000<br />
SpawnIntervalHardest = 8000<br />
</pre><br />
<br />
You can modify the "FundsOfTeamX" lines to change the amount of starting gold. There is a limit, but I do not know it exactly, so I will say that you should keep it to 200000 or lower.<br />
<br />
Now, to actually add some spawns. You will need to do a little bit of diving in the mod's inis. To add spawns, look for something like "AddActor = AHuman (nextline tab) PresetName = Actor". This means that an actor called "Actor" can be used in your activities. AddActor = ACrab, AddActor = ACDropShip, AddActor = ACRocket, AddDevice = HDFirearm, AddDevice = TDExplosive, and AddDevice = HeldDevice are all things you can spawn in your activities. Look above for more help. Copy down their PresetNames, as well as the data type (the thing after AddDevice =).<br />
A basic spawn block.<br />
<br />
<pre><br />
AddAttackerSpawn = ACDropShip<br />
CopyOf = Dropship<br />
AddInventory = AHuman<br />
CopyOf = Actor<br />
AddInventory = HDFirearm<br />
CopyOf = Gun<br />
</pre><br />
<br />
This is saying that you want a dropship with a presetname of "Dropship" to be loaded with an actor, "Actor", equipped with a gun "Gun. You can add all the "AddInventory" blocks you want, though usually most people keep it to about two guns and a digger and a grenade, if that.<br />
Continue to add "AddAttackerSpawn" blocks until you are satisfied with your dastardy creation. Then, save it and start up Cortex.<br />
<br />
One of three things can happen here. More, actually, but these are the three I'm specifically going over here.<br><br />
1. Cortex will start up and everything will work fine.<br><br />
-Solution: Survive your newly created onslaught.<br><br />
2. Cortex will start up, but when you select a difficulty in skirmish mode it will crash. Boo!<br><br />
-Solution: Make sure your activities is loaded in the mod's index.<br><br />
3. Cortex will not start up and give an error, about not being able to find "Actor" or something of that sort. Boo!<br><br />
-Solution: Make sure you copied down the data types and PresetNames of all the objects you want to load.<br><br />
<br />
If you get an error that is not one of the above, post in Support. With plenty of details as to exactly what went wrong.<br />
<br />
And that's it. One step closer to modding in Cortex. Congratulations if you got it. If you didn't, carefully check your work.<br />
<br />
==Grif's guide==<br />
Okay, so first off, get to your /Cortex Command/ directory in Windows Explorer.<br />
<br />
Go to <mod>.rte.<br />
<br />
Open Index.ini in Notepad. It will always be in the first folder inside Mod.rte.<br />
<br />
After EVERY line except for Datamodule in this folder, add a double-slash: //<br />
<br />
Once accomplished, the mod Index should look like this:<br />
<br />
<pre><br />
DataModule<br />
// IncludeFile = Grif.rte/Blender/Index.ini<br />
// IncludeFile = Grif.rte/Bunklearer/Index.ini<br />
// IncludeFile = Grif.rte/CIWS/Index.ini<br />
// IncludeFile = Grif.rte/Crusher/Index.ini<br />
// IncludeFile = Grif.rte/Invinciclone/Index.ini<br />
// IncludeFile = Grif.rte/Kinetic/Index.ini<br />
// IncludeFile = Grif.rte/Bunker/Index.ini<br />
</pre><br />
<br />
Note that the DataModule line is not commented out, but all the others are. That's important; if you comment out DataModule the game will crash on startup.<br />
<br />
NOW. Copy EVERY includefile line from the mod. (except for my mod, where the last line is to an activities edit and not needed)<br />
<br />
Go back to the /Cortex Command/ directory, and click into Base.rte.<br />
<br />
Open Index.ini. Now, this is the tricky part, so pay attention.<br />
<br />
First, paste all the IncludeFiles you just copied at the end of the includefiles of Index.ini, but BEFORE the IncludeFile for Activities.ini.<br />
<br />
So, the pasted includefiles are after EVERYTHING EXCEPT ACTIVITIES.<br />
<br />
That's vital; because most mods have dependencies somewhere inside base.rte.<br />
<br />
Now, your Index.ini should look something like this:<br />
<br />
<pre><br />
DataModule<br />
IncludeFile = Base.rte/Materials.ini<br />
IncludeFile = Base.rte/Sounds.ini<br />
IncludeFile = Base.rte/Effects.ini<br />
IncludeFile = Base.rte/Ammo.ini<br />
IncludeFile = Base.rte/Devices.ini<br />
IncludeFile = Base.rte/Actors.ini<br />
IncludeFile = Base.rte/Scenes.ini<br />
// IncludeFile = Grif.rte/Blender/Index.ini<br />
// IncludeFile = Grif.rte/Bunklearer/Index.ini<br />
// IncludeFile = Grif.rte/CIWS/Index.ini<br />
// IncludeFile = Grif.rte/Crusher/Index.ini<br />
// IncludeFile = Grif.rte/Invinciclone/Index.ini<br />
// IncludeFile = Grif.rte/Kinetic/Index.ini<br />
// IncludeFile = Grif.rte/Bunker/Index.ini<br />
IncludeFile = Base.rte/Activities.ini<br />
</pre><br />
<br />
The especially savvy members will now begin to wonder where I'm going with this; now every IncludeFile that references the mod has been commented out.<br />
<br />
Well, now what you do is, delete the //es you made in the mod Index. Once they're in Index.ini of Base.rte, we want them to load; but if we have both sets of includefiles load, then you will have duplicates of everything in the buy and build menus.<br />
<br />
So, proceed to remove all the doubleslashes.<br />
<br />
<pre><br />
DataModule<br />
IncludeFile = Base.rte/Materials.ini<br />
IncludeFile = Base.rte/Sounds.ini<br />
IncludeFile = Base.rte/Effects.ini<br />
IncludeFile = Base.rte/Ammo.ini<br />
IncludeFile = Base.rte/Devices.ini<br />
IncludeFile = Base.rte/Actors.ini<br />
IncludeFile = Base.rte/Scenes.ini<br />
IncludeFile = Grif.rte/Blender/Index.ini<br />
IncludeFile = Grif.rte/Bunklearer/Index.ini<br />
IncludeFile = Grif.rte/CIWS/Index.ini<br />
IncludeFile = Grif.rte/Crusher/Index.ini<br />
IncludeFile = Grif.rte/Invinciclone/Index.ini<br />
IncludeFile = Grif.rte/Kinetic/Index.ini<br />
IncludeFile = Grif.rte/Bunker/Index.ini<br />
IncludeFile = Base.rte/Activities.ini<br />
</pre><br />
<br />
Now, go to Activities.ini, and add away. Note: You will have to add the Includefiles from EVERY mod you want loaded; it's probably the primary reason I put all my mods into one pack.<br />
<br />
To change what craft are delivered, use this basic guide:<br />
In each mod .rte, somewhere, there is a root instancename for what you want to mod into Activities.ini, and a root prop type for it.<br />
<br />
Nearly always, this will be one of the following:<br><br />
*ADoor<br><br />
*ACDropship<br><br />
*ACrab<br><br />
*ACRocket<br><br />
*AHuman<br><br />
*HDFirearm<br><br />
*HeldDevice<br><br />
*TDExplosive<br><br />
<br />
Most of the time, this is fairly self explanatory.<br />
<br />
If it's a door, it's going to be an ADoor.<br><br />
If it's a dropship, it'll be an ACDropship.<br><br />
If it's a crab, OR a four-legged turret, it'll be an ACrab.<br><br />
ACRocket is for rockets.<br><br />
HDFirearm just means gun (held device firearm), so any gun mod will use this.<br><br />
HeldDevice is what Shields use; specifically the Riot Shield.<br><br />
TDExplosive is for most bombs, and all grenades.<br><br />
<br />
So, here's what you do. Depending on the mod, the particle type will change. So, first, what you have to do is find the prop type. Generally, in the buy menu, this will be explained for you.<br />
The Actors tab covers AHuman and ACrab. AHuman also covers Robots, so don't make it ARobot in your activities edit.<br />
Craft covers ACRockets and ACDropships. Hint: Rockets have one engine, dropships have two.<br />
Shields tab has HeldDevices, Bombs has TDExplosives.<br />
Tools and Firearms are both HDFirearms.<br />
<br />
So, then, you have to get the instancename, which is just the name of the mod. This is even easier; just look at what it's called in either the Bunker Editor or Build Menu.<br />
<br />
Now, open Activities.ini, scroll down to the Grasslands activities, and mod away.<br />
<br />
<pre><br />
AddAttackerSpawn = <prop><br />
CopyOf = <instancename><br />
</pre><br />
<br />
All there really is to it. Oh, and if you're curious, yes, you can make AHumans fall from the sky. Or HDFirearms.<br />
<br />
[[Category:Tutorials]]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/ACrabLuaDocs/ACrab2013-02-10T04:41:03Z<p>Brendan: I've never even heard anyone say a possessive form of "this". You wouldn't make "the" possessive, unless you were dumb enough to think "this" was plural and slap an apostrophe on the end.</p>
<hr />
<div><br />
===Parent: [[Actor|Actor]]===<br />
<br />
'''Concrete Class.''' <br />
A crab-like actor with four legs.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
<br />
==Enumerations==<br />
===MovementState===<br />
* 0 = STAND<br />
* 1 = WALK<br />
* 2 = JUMP<br />
* 3 = DISLODGE<br />
* 4 = MOMENTSTATECOUNT<br />
<br />
<br />
===Side===<br />
* 0 = LEFTSIDE<br />
* 1 = RIGHTSIDE<br />
* 2 = SIDECOUNT<br />
<br />
<br />
===Layer===<br />
* 0 = FGROUND<br />
* 1 = BGROUND<br />
<br />
<br />
===DeviceHandlingState===<br />
* 0 = STILL<br />
* 1 = POINTING<br />
* 2 = SCANNING<br />
* 3 = AIMING<br />
* 4 = FIRING<br />
* 5 = THROWING<br />
* 6 = DIGGING<br />
<br />
<br />
===SweepState===<br />
* 0 = NOSWEEP<br />
* 1 = SWEEPINGUP<br />
* 2 = SWEEPINGPAUSE<br />
* 3 = SWEEPINGDOWN<br />
* 4 = SWEEMDOWNPAUSE<br />
<br />
<br />
===DigState===<br />
* 0 = NOTDIGGING<br />
* 1 = PREDIG<br />
* 2 = STARTDIG<br />
* 3 = TUNNELING<br />
* 4 = FINISHINGDIG<br />
* 5 = PAUSEDIGGER<br />
<br />
<br />
===JumpState===<br />
* 0 = NOTJUMPING<br />
* 1 = FORWARDJUMP<br />
* 2 = PREJUMP<br />
* 3 = UPJUMP<br />
* 4 = APEXJUMP<br />
* 5 = LANDJUMP<br />
<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===FirearmIsReady===<br />
Read-only property. Indicates whether the currently held HDFirearm is ready for use, and has ammo etc.<br />
<br />
===FirearmIsEmpty===<br />
Read-only property. Indicates whether the currently held HDFirearm is out of ammo.<br />
<br />
===FirearmNeedsReload===<br />
Read-only property. Indicates whether the currently held HDFirearm has less than half of its ammo left.<br />
<br />
===FirearmIsSemiAuto===<br />
Read-only property. Indicates whether the currently held HDFirearm is semi-auto (" = 1") or full-auto (" = 0").<br />
<br />
==Functions==<br />
===ReloadFirearm===<br />
Reloads the currently held firearm, if any.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===IsWithinRange===<br />
Tells whether a point on the scene is within close range of the currently used device and aiming status, if applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* A Vector with the absolute coordinates of a point to check.<br />
<br />
'''Return value:'''<br />
<br />
Whether the point is within close range of this.<br />
<br />
<br><br />
<br />
===LookForMOs===<br />
Casts an MO detecting ray in the direction of where the head is looking at the time. Factors including head rotation, sharp aim mode, and other variables determine how this ray is cast.<br />
<br />
'''Arguments:'''<br />
<br />
* The degree angle to deviate from the current view point in the ray casting. A random ray will be chosen out of this +-range.<br />
* A specific material ID to ignore (see through)<br />
* Whether to ignore all terrain or not (true means 'x-ray vision').<br />
<br />
'''Return value:'''<br />
<br />
A pointer to the MO seen while looking.<br />
<br />
<br><br />
<br />
===IsOnScenePoint===<br />
Indicates whether this ACrab's current graphical representation overlaps a point given in absolute scene coordinates.<br />
<br />
'''Arguments:'''<br />
<br />
* The point in absolute scene coordinates.<br />
<br />
'''Return value:'''<br />
<br />
Whether the graphical representation overlaps the specified scene point.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/ACrabLuaDocs/ACrab2013-02-10T04:34:49Z<p>Brendan: MediaWiki collapses multiple trailing new lines / carriage returns down to one between the section edited and any following. This will preserve spacing when sub-sections of "Functions" are edited.</p>
<hr />
<div><br />
===Parent: [[Actor|Actor]]===<br />
<br />
'''Concrete Class.''' <br />
A crab-like actor with four legs.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
<br />
==Enumerations==<br />
===MovementState===<br />
* 0 = STAND<br />
* 1 = WALK<br />
* 2 = JUMP<br />
* 3 = DISLODGE<br />
* 4 = MOMENTSTATECOUNT<br />
<br />
<br />
===Side===<br />
* 0 = LEFTSIDE<br />
* 1 = RIGHTSIDE<br />
* 2 = SIDECOUNT<br />
<br />
<br />
===Layer===<br />
* 0 = FGROUND<br />
* 1 = BGROUND<br />
<br />
<br />
===DeviceHandlingState===<br />
* 0 = STILL<br />
* 1 = POINTING<br />
* 2 = SCANNING<br />
* 3 = AIMING<br />
* 4 = FIRING<br />
* 5 = THROWING<br />
* 6 = DIGGING<br />
<br />
<br />
===SweepState===<br />
* 0 = NOSWEEP<br />
* 1 = SWEEPINGUP<br />
* 2 = SWEEPINGPAUSE<br />
* 3 = SWEEPINGDOWN<br />
* 4 = SWEEMDOWNPAUSE<br />
<br />
<br />
===DigState===<br />
* 0 = NOTDIGGING<br />
* 1 = PREDIG<br />
* 2 = STARTDIG<br />
* 3 = TUNNELING<br />
* 4 = FINISHINGDIG<br />
* 5 = PAUSEDIGGER<br />
<br />
<br />
===JumpState===<br />
* 0 = NOTJUMPING<br />
* 1 = FORWARDJUMP<br />
* 2 = PREJUMP<br />
* 3 = UPJUMP<br />
* 4 = APEXJUMP<br />
* 5 = LANDJUMP<br />
<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===FirearmIsReady===<br />
Read-only property. Indicates whether the currently held HDFirearm is ready for use, and has ammo etc.<br />
<br />
===FirearmIsEmpty===<br />
Read-only property. Indicates whether the currently held HDFirearm is out of ammo.<br />
<br />
===FirearmNeedsReload===<br />
Read-only property. Indicates whether the currently held HDFirearm has less than half of its ammo left.<br />
<br />
===FirearmIsSemiAuto===<br />
Read-only property. Indicates whether the currently held HDFirearm is semi-auto (" = 1") or full-auto (" = 0").<br />
<br />
==Functions==<br />
===ReloadFirearm===<br />
Reloads the currently held firearm, if any.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===IsWithinRange===<br />
Tells whether a point on the scene is within close range of the currently used device and aiming status, if applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* A Vector with the absolute coordinates of a point to check.<br />
<br />
'''Return value:'''<br />
<br />
Whether the point is within close range of this.<br />
<br />
<br><br />
<br />
===LookForMOs===<br />
Casts an MO detecting ray in the direction of where the head is looking at the time. Factors including head rotation, sharp aim mode, and other variables determine how this ray is cast.<br />
<br />
'''Arguments:'''<br />
<br />
* The degree angle to deviate from the current view point in the ray casting. A random ray will be chosen out of this +-range.<br />
* A specific material ID to ignore (see through)<br />
* Whether to ignore all terrain or not (true means 'x-ray vision').<br />
<br />
'''Return value:'''<br />
<br />
A pointer to the MO seen while looking.<br />
<br />
<br><br />
<br />
===IsOnScenePoint===<br />
Indicates whether this' current graphical representation overlaps a point in absolute scene coordinates.<br />
<br />
'''Arguments:'''<br />
<br />
* The point in absolute scene coordinates.<br />
<br />
'''Return value:'''<br />
<br />
Whether this' graphical rep overlaps the scene point.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/ACrabLuaDocs/ACrab2013-02-10T04:33:56Z<p>Brendan: Typos</p>
<hr />
<div><br />
===Parent: [[Actor|Actor]]===<br />
<br />
'''Concrete Class.''' <br />
A crab-like actor with four legs.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
<br />
==Enumerations==<br />
===MovementState===<br />
* 0 = STAND<br />
* 1 = WALK<br />
* 2 = JUMP<br />
* 3 = DISLODGE<br />
* 4 = MOMENTSTATECOUNT<br />
<br />
<br />
===Side===<br />
* 0 = LEFTSIDE<br />
* 1 = RIGHTSIDE<br />
* 2 = SIDECOUNT<br />
<br />
<br />
===Layer===<br />
* 0 = FGROUND<br />
* 1 = BGROUND<br />
<br />
<br />
===DeviceHandlingState===<br />
* 0 = STILL<br />
* 1 = POINTING<br />
* 2 = SCANNING<br />
* 3 = AIMING<br />
* 4 = FIRING<br />
* 5 = THROWING<br />
* 6 = DIGGING<br />
<br />
<br />
===SweepState===<br />
* 0 = NOSWEEP<br />
* 1 = SWEEPINGUP<br />
* 2 = SWEEPINGPAUSE<br />
* 3 = SWEEPINGDOWN<br />
* 4 = SWEEMDOWNPAUSE<br />
<br />
<br />
===DigState===<br />
* 0 = NOTDIGGING<br />
* 1 = PREDIG<br />
* 2 = STARTDIG<br />
* 3 = TUNNELING<br />
* 4 = FINISHINGDIG<br />
* 5 = PAUSEDIGGER<br />
<br />
<br />
===JumpState===<br />
* 0 = NOTJUMPING<br />
* 1 = FORWARDJUMP<br />
* 2 = PREJUMP<br />
* 3 = UPJUMP<br />
* 4 = APEXJUMP<br />
* 5 = LANDJUMP<br />
<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===FirearmIsReady===<br />
Read-only property. Indicates whether the currently held HDFirearm is ready for use, and has ammo etc.<br />
<br />
===FirearmIsEmpty===<br />
Read-only property. Indicates whether the currently held HDFirearm is out of ammo.<br />
<br />
===FirearmNeedsReload===<br />
Read-only property. Indicates whether the currently held HDFirearm has less than half of its ammo left.<br />
<br />
===FirearmIsSemiAuto===<br />
Read-only property. Indicates whether the currently held HDFirearm is semi-auto (" = 1") or full-auto (" = 0").<br />
<br />
==Functions==<br />
===ReloadFirearm===<br />
Reloads the currently held firearm, if any.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsWithinRange===<br />
Tells whether a point on the scene is within close range of the currently used device and aiming status, if applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* A Vector with the absolute coordinates of a point to check.<br />
<br />
'''Return value:'''<br />
<br />
Whether the point is within close range of this.<br />
<br />
===LookForMOs===<br />
Casts an MO detecting ray in the direction of where the head is looking at the time. Factors including head rotation, sharp aim mode, and other variables determine how this ray is cast.<br />
<br />
'''Arguments:'''<br />
<br />
* The degree angle to deviate from the current view point in the ray casting. A random ray will be chosen out of this +-range.<br />
* A specific material ID to ignore (see through)<br />
* Whether to ignore all terrain or not (true means 'x-ray vision').<br />
<br />
'''Return value:'''<br />
<br />
A pointer to the MO seen while looking.<br />
<br />
<br />
===IsOnScenePoint===<br />
Indicates whether this' current graphical representation overlaps a point in absolute scene coordinates.<br />
<br />
'''Arguments:'''<br />
<br />
* The point in absolute scene coordinates.<br />
<br />
'''Return value:'''<br />
<br />
Whether this' graphical rep overlaps the scene point.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/ACrabLuaDocs/ACrab2013-02-10T04:33:10Z<p>Brendan: Removed redundant, malformed statements. Crystal clear clarification of semi-auto and full-auto.</p>
<hr />
<div><br />
===Parent: [[Actor|Actor]]===<br />
<br />
'''Concrete Class.''' <br />
A crab-like actor with four legs.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
<br />
==Enumerations==<br />
===MovementState===<br />
* 0 = STAND<br />
* 1 = WALK<br />
* 2 = JUMP<br />
* 3 = DISLODGE<br />
* 4 = MOMENTSTATECOUNT<br />
<br />
<br />
===Side===<br />
* 0 = LEFTSIDE<br />
* 1 = RIGHTSIDE<br />
* 2 = SIDECOUNT<br />
<br />
<br />
===Layer===<br />
* 0 = FGROUND<br />
* 1 = BGROUND<br />
<br />
<br />
===DeviceHandlingState===<br />
* 0 = STILL<br />
* 1 = POINTING<br />
* 2 = SCANNING<br />
* 3 = AIMING<br />
* 4 = FIRING<br />
* 5 = THROWING<br />
* 6 = DIGGING<br />
<br />
<br />
===SweepState===<br />
* 0 = NOSWEEP<br />
* 1 = SWEEPINGUP<br />
* 2 = SWEEPINGPAUSE<br />
* 3 = SWEEPINGDOWN<br />
* 4 = SWEEMDOWNPAUSE<br />
<br />
<br />
===DigState===<br />
* 0 = NOTDIGGING<br />
* 1 = PREDIG<br />
* 2 = STARTDIG<br />
* 3 = TUNNELING<br />
* 4 = FINISHINGDIG<br />
* 5 = PAUSEDIGGER<br />
<br />
<br />
===JumpState===<br />
* 0 = NOTJUMPING<br />
* 1 = FORWARDJUMP<br />
* 2 = PREJUMP<br />
* 3 = UPJUMP<br />
* 4 = APEXJUMP<br />
* 5 = LANDJUMP<br />
<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===FirearmIsReady===<br />
Read-only property. Indicates whether the currently held HDFirearm is ready for use, and has ammo etc.<br />
<br />
===FirearmIsEmpty===<br />
Read-only property. Indicates whether the currently held HDFirearm is out of ammo.<br />
<br />
===FirearmNeedsReload===<br />
Read-only property. Indicates whether the currently held HDFirearm has less than half of its ammo left.<br />
<br />
===FirearmIsSemiAuto===<br />
Read-only property. Indicates whether the currently held HDFirearm is semi-auto (" = 1") or full-auto (" = 0").<br />
<br />
==Functions==<br />
===ReloadFirearm===<br />
Reloads the currently held firearm, if any.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsWithinRange===<br />
Tells whether a point on the scene is within close range of the currently used device and aiming status, if applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* A Vector witht he aboslute coordinates of a point to check.<br />
<br />
'''Return value:'''<br />
<br />
Whether the point is within close range of this.<br />
<br />
<br />
===LookForMOs===<br />
Casts an MO detecting ray in the direction of where the head is looking at the time. Factors including head rotation, sharp aim mode, and other variables determine how this ray is cast.<br />
<br />
'''Arguments:'''<br />
<br />
* The degree angle to deviate from the current view point in the ray casting. A random ray will be chosen out of this +-range.<br />
* A specific material ID to ignore (see through)<br />
* Whether to ignore all terrain or not (true means 'x-ray vision').<br />
<br />
'''Return value:'''<br />
<br />
A pointer to the MO seen while looking.<br />
<br />
<br />
===IsOnScenePoint===<br />
Indicates whether this' current graphical representation overlaps a point in absolute scene coordinates.<br />
<br />
'''Arguments:'''<br />
<br />
* The point in absolute scene coordinates.<br />
<br />
'''Return value:'''<br />
<br />
Whether this' graphical rep overlaps the scene point.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/ACrabLuaDocs/ACrab2013-02-10T04:27:34Z<p>Brendan: Whitespace. Assume there's some reason and meaning why certain sentences had been given no space after period. Grammar abuse.</p>
<hr />
<div><br />
===Parent: [[Actor|Actor]]===<br />
<br />
'''Concrete Class.''' <br />
A crab-like actor with four legs.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
<br />
==Enumerations==<br />
===MovementState===<br />
* 0 = STAND<br />
* 1 = WALK<br />
* 2 = JUMP<br />
* 3 = DISLODGE<br />
* 4 = MOMENTSTATECOUNT<br />
<br />
<br />
===Side===<br />
* 0 = LEFTSIDE<br />
* 1 = RIGHTSIDE<br />
* 2 = SIDECOUNT<br />
<br />
<br />
===Layer===<br />
* 0 = FGROUND<br />
* 1 = BGROUND<br />
<br />
<br />
===DeviceHandlingState===<br />
* 0 = STILL<br />
* 1 = POINTING<br />
* 2 = SCANNING<br />
* 3 = AIMING<br />
* 4 = FIRING<br />
* 5 = THROWING<br />
* 6 = DIGGING<br />
<br />
<br />
===SweepState===<br />
* 0 = NOSWEEP<br />
* 1 = SWEEPINGUP<br />
* 2 = SWEEPINGPAUSE<br />
* 3 = SWEEPINGDOWN<br />
* 4 = SWEEMDOWNPAUSE<br />
<br />
<br />
===DigState===<br />
* 0 = NOTDIGGING<br />
* 1 = PREDIG<br />
* 2 = STARTDIG<br />
* 3 = TUNNELING<br />
* 4 = FINISHINGDIG<br />
* 5 = PAUSEDIGGER<br />
<br />
<br />
===JumpState===<br />
* 0 = NOTJUMPING<br />
* 1 = FORWARDJUMP<br />
* 2 = PREJUMP<br />
* 3 = UPJUMP<br />
* 4 = APEXJUMP<br />
* 5 = LANDJUMP<br />
<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===FirearmIsReady===<br />
Read-only property. Indicates whether the currently held HDFirearm is ready for use, and has ammo etc.<br />
Whether a currently HDFirearm (if any) is ready for use.<br />
<br />
===FirearmIsEmpty===<br />
Read-only property. Indicates whether the currently held HDFirearm is out of ammo.<br />
Whether a currently HDFirearm (if any) is out of ammo.<br />
<br />
===FirearmNeedsReload===<br />
Read-only property. Indicates whether the currently held HDFirearm is almost out of ammo.<br />
Whether a currently HDFirearm (if any) has less than half of ammo left.<br />
<br />
===FirearmIsSemiAuto===<br />
Read-only property. Indicates whether the currently held HDFirearm is semi or full auto.<br />
Whether a currently HDFirearm (if any) is a semi auto device.<br />
<br />
==Functions==<br />
===ReloadFirearm===<br />
Reloads the currently held firearm, if any.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsWithinRange===<br />
Tells whether a point on the scene is within close range of the currently used device and aiming status, if applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* A Vector witht he aboslute coordinates of a point to check.<br />
<br />
'''Return value:'''<br />
<br />
Whether the point is within close range of this.<br />
<br />
<br />
===LookForMOs===<br />
Casts an MO detecting ray in the direction of where the head is looking at the time. Factors including head rotation, sharp aim mode, and other variables determine how this ray is cast.<br />
<br />
'''Arguments:'''<br />
<br />
* The degree angle to deviate from the current view point in the ray casting. A random ray will be chosen out of this +-range.<br />
* A specific material ID to ignore (see through)<br />
* Whether to ignore all terrain or not (true means 'x-ray vision').<br />
<br />
'''Return value:'''<br />
<br />
A pointer to the MO seen while looking.<br />
<br />
<br />
===IsOnScenePoint===<br />
Indicates whether this' current graphical representation overlaps a point in absolute scene coordinates.<br />
<br />
'''Arguments:'''<br />
<br />
* The point in absolute scene coordinates.<br />
<br />
'''Return value:'''<br />
<br />
Whether this' graphical rep overlaps the scene point.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T04:06:15Z<p>Brendan: Stop repeating yourself! Stop repeating yourself!</p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
1.0 means normal sharpness, no alteration to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absolute position of the top of this MO's HUD stack.<br />
A Vector with the absolute position of this MO's HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MOs, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling onto the terrain (i.e. become dirt) or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to "shake loose" this MO from a "pinned" state. Pinned MOs don't get moved by travel algorithms. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s).<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br><br />
<br />
===GetAltitude===<br />
Gets the altitude of this MO's position (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br><br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br><br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
<br><br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br><br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br><br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br><br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br><br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br><br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br><br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br><br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whether the object was found carried by this.<br />
<br />
<br><br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whether the object in the group was found carried by this.<br />
<br />
<br><br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br><br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br><br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T04:05:11Z<p>Brendan: A little less hyphen- ation.</p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alteration to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absolute position of the top of this MO's HUD stack.<br />
A Vector with the absolute position of this MO's HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MOs, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling onto the terrain (i.e. become dirt) or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to "shake loose" this MO from a "pinned" state. Pinned MOs don't get moved by travel algorithms. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s).<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br><br />
<br />
===GetAltitude===<br />
Gets the altitude of this MO's position (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br><br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br><br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
<br><br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br><br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br><br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br><br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br><br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br><br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br><br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br><br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whether the object was found carried by this.<br />
<br />
<br><br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whether the object in the group was found carried by this.<br />
<br />
<br><br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br><br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br><br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T04:02:57Z<p>Brendan: </p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absolute position of the top of this MO's HUD stack.<br />
A Vector with the absolute position of this MO's HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MOs, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling onto the terrain (i.e. become dirt) or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to "shake loose" this MO from a "pinned" state. Pinned MOs don't get moved by travel algorithms. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s).<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br><br />
<br />
===GetAltitude===<br />
Gets the altitude of this MO's position (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br><br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br><br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
<br><br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br><br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br><br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br><br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br><br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br><br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br><br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br><br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whether the object was found carried by this.<br />
<br />
<br><br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whether the object in the group was found carried by this.<br />
<br />
<br><br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br><br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br><br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T03:30:04Z<p>Brendan: MediaWiki collapses multiple trailing new lines / carriage returns down to one between the section edited and any following. This will preserve spacing when sub-sections of "Functions" are edited.</p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absolute position of the top of this MO's HUD stack.<br />
A Vector with the absolute position of this MO's HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MOs, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling onto the terrain (i.e. become dirt) or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to "shake loose" this MO from a "pinned" state. Pinned MOs don't get moved by travel algorithms. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s).<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br><br />
<br />
===GetAltitude===<br />
Gets the altitide of this' pos (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br><br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br><br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
<br><br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br><br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br><br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br><br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br><br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br><br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br><br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br><br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whether the object was found carried by this.<br />
<br />
<br><br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whether the object in the group was found carried by this.<br />
<br />
<br><br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br><br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br><br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br><br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T03:19:42Z<p>Brendan: Spelling</p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absolute position of the top of this MO's HUD stack.<br />
A Vector with the absolute position of this MO's HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MOs, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling onto the terrain (i.e. become dirt) or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to "shake loose" this MO from a "pinned" state. Pinned MOs don't get moved by travel algorithms. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s).<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br />
===GetAltitude===<br />
Gets the altitide of this' pos (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whether the object was found carried by this.<br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whether the object in the group was found carried by this.<br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T03:19:15Z<p>Brendan: Spelling</p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absolute position of the top of this MO's HUD stack.<br />
A Vector with the absolute position of this MO's HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MOs, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling onto the terrain (i.e. become dirt) or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to "shake loose" this MO from a "pinned" state. Pinned MOs don't get moved by travel algorithms. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s).<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br />
===GetAltitude===<br />
Gets the altitide of this' pos (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whether the object was found carried by this.<br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object in the group was found carried by this.<br />
<br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T03:15:20Z<p>Brendan: </p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absolute position of the top of this MO's HUD stack.<br />
A Vector with the absolute position of this MO's HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MOs, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling onto the terrain (i.e. become dirt) or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to "shake loose" this MO from a "pinned" state. Pinned MOs don't get moved by travel algorithms. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s).<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br />
===GetAltitude===<br />
Gets the altitide of this' pos (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object was found carried by this.<br />
<br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object in the group was found carried by this.<br />
<br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T03:05:01Z<p>Brendan: Was already said once by someone who didn't make their elementary teachers give up on them.</p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absolute position of the top of this MO's HUD stack.<br />
A Vector with the absolute position of this MO's HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MOs, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling onto the terrain (i.e. become dirt) or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to 'shake loose' this from a 'pinned' state. Pinned MOs don't get moved by travel algos. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s). 0 means no pinning<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br />
===GetAltitude===<br />
Gets the altitide of this' pos (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object was found carried by this.<br />
<br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object in the group was found carried by this.<br />
<br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T02:57:31Z<p>Brendan: " s' " is possessive for a plural subject. Unless there's a Vietnamese e. e. cummings named "thi", someone needs to put the apostrophe down and release the hostage English grammar alive and unharmed.</p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absolute position of the top of this MO's HUD stack.<br />
A Vector with the absolute position of this MO's HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MOs, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling onto the terrain (i.e. become dirt) or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
Whether this' HUD gets drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to 'shake loose' this from a 'pinned' state. Pinned MOs don't get moved by travel algos. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s). 0 means no pinning<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br />
===GetAltitude===<br />
Gets the altitide of this' pos (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object was found carried by this.<br />
<br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object in the group was found carried by this.<br />
<br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T02:51:17Z<p>Brendan: Spelling. Minor clarification.</p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absoltue position of the top of this' HUD stack.<br />
A Vector with the absolute position of this' HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MOs, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling onto the terrain (i.e. become dirt) or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
Whether this' HUD gets drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to 'shake loose' this from a 'pinned' state. Pinned MOs don't get moved by travel algos. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s). 0 means no pinning<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br />
===GetAltitude===<br />
Gets the altitide of this' pos (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object was found carried by this.<br />
<br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object in the group was found carried by this.<br />
<br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T02:50:11Z<p>Brendan: " 's " is possessive. GetsHitByMOs is not possessive; everyone on the block can hit it, like your mom.</p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absoltue position of the top of this' HUD stack.<br />
A Vector with the absolute position of this' HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MOs, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling ontot the terrain or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
Whether this' HUD gets drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to 'shake loose' this from a 'pinned' state. Pinned MOs don't get moved by travel algos. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s). 0 means no pinning<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br />
===GetAltitude===<br />
Gets the altitide of this' pos (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object was found carried by this.<br />
<br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object in the group was found carried by this.<br />
<br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T02:48:22Z<p>Brendan: " 's " is possessive. HitsMOs is not possessive; it hits as many MoveableObjects as it feels like.</p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absoltue position of the top of this' HUD stack.<br />
A Vector with the absolute position of this' HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MOs during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MO's, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling ontot the terrain or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
Whether this' HUD gets drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to 'shake loose' this from a 'pinned' state. Pinned MOs don't get moved by travel algos. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s). 0 means no pinning<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br />
===GetAltitude===<br />
Gets the altitide of this' pos (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object was found carried by this.<br />
<br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object in the group was found carried by this.<br />
<br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T02:38:38Z<p>Brendan: Whitespace. Assume there's some reason and meaning why certain sentences had been given no space after period; preserved in code though will display as a space, not new line.</p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.<br />
A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.<br />
A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.<br />
A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.<br />
The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.<br />
The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.<br />
The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.<br />
The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.<br />
A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.<br />
A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.<br />
An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.<br />
An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!<br />
The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.<br />
The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absoltue position of the top of this' HUD stack.<br />
A Vector with the absolute position of this' HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.<br />
Whether this hits other MO's during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.<br />
Whether this can get hit by MO's, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.<br />
Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.<br />
Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.<br />
Whether this MO is marked for settling ontot the terrain or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.<br />
Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.<br />
Whether this' HUD gets drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to 'shake loose' this from a 'pinned' state. Pinned MOs don't get moved by travel algos. If 0, this isn't pinned.<br />
The impulse threshold in kg * (m/s). 0 means no pinning<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br />
===GetAltitude===<br />
Gets the altitide of this' pos (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object was found carried by this.<br />
<br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object in the group was found carried by this.<br />
<br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/MovableObjectLuaDocs/MovableObject2013-02-10T02:24:09Z<p>Brendan: </p>
<hr />
<div><br />
===Parent: [[SceneObject|SceneObject]]===<br />
<br />
'''Abstract Class.''' <br />
A movable object with mass.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.A string with the friendly-formatted type name of this object.<br />
<br />
===Mass===<br />
The mass value of this MovableObject.A float describing the mass value in Kilograms (kg).<br />
<br />
===Vel===<br />
The velocity vector of this MovableObject.A Vector describing the current velocity vector.<br />
<br />
===AngularVel===<br />
The current angular velocity of this MovableObject. Positive is a counter-clockwise rotation.The angular velocity in radians per second.<br />
<br />
===Radius===<br />
Read-only property. The largest radius of this in pixels.The radius from its center to the edge of its graphical representation.<br />
<br />
===Diameter===<br />
Read-only property. The largest diameter of this in pixels.The largest diameter across its graphical representation.<br />
<br />
===Scale===<br />
The current scale of this MOSRotating. This is mostly for fun.The normalized scale.<br />
<br />
===Age===<br />
Gets real time age of this MovableObject.A unsigned long describing the current age in ms.<br />
<br />
===Lifetime===<br />
The amount of time this MovableObject will exist from creation.A unsigned long describing the current lifetime in ms. 0 means unlimited.<br />
<br />
===ID===<br />
Read-only property. The MOID of this MovableObject for this frame.An unsigned char specifying the MOID that this MovableObject is assigned for the current frame only.<br />
<br />
===RootID===<br />
Read-only property. The MOID of the MovableObject which is the root MO of this MO for this frame. If same as what GetID returns, then this is owned by MovableMan.An unsigned char specifying the MOID of the MO that this MovableObject is owned by for the current frame only.<br />
<br />
===MOIDFootprint===<br />
Read-only property. Gets how many total (subsequent) MOID's this MO and all its children are taking up this frame. ie if this MO has no children, this will likely be 1. Note this is only valid for this frame!The number of MOID indices this MO and all its children are taking up.<br />
<br />
===Sharpness===<br />
The sharpness factor of this MO.The sharpness factor of this MO. 1.0 means normal sharpness, no alter- ation to any of the impulses.<br />
<br />
===AboveHUDPos===<br />
Read-only property. The absoltue position of the top of this' HUD stack.A Vector with the absolute position of this' HUD stack top point.<br />
<br />
===HitsMOs===<br />
Gets whether this MovableObject is set to collide with other MovableObject:s during its travel.Whether this hits other MO's during its travel, or not.<br />
<br />
===GetsHitByMOs===<br />
Gets whether this MovableObject is set to be able to get hit by other MovableObject:s during their travel.Whether this can get hit by MO's, or not.<br />
<br />
===IgnoresTeamHits===<br />
Tells whether this will collide with any other MO of the same team.Whether this can hit or get hit by other MOs of the same team.<br />
<br />
===IgnoresWhichTeam===<br />
Read-only property. Tells which team this would be ignoring hits with, if we're ignoring hits at all.Which team this ignores hits with, if any.<br />
<br />
===ToSettle===<br />
Indicates whether this MO is marked for settling at the end of the MovableMan update.Whether this MO is marked for settling ontot the terrain or not.<br />
<br />
===ToDelete===<br />
Indicates whether this MO is marked for deletion at the end of the MovableMan update.Whether this MO is marked for deletion or not.<br />
<br />
===HUDVisible===<br />
Tells whether this Actor's HUD is drawn or not.Whether this' HUD gets drawn or not.<br />
<br />
===PinStrength===<br />
The impulse force threshold which has to be exceeded to 'shake loose' this from a 'pinned' state. Pinned MOs don't get moved by travel algos. If 0, this isn't pinned.The impulse threshold in kg * (m/s). 0 means no pinning<br />
<br />
<br />
==Functions==<br />
===ReloadScripts===<br />
Reloads the preset scripts of this object, from the same script file path as was originally defined. This will also update the original preset in the PresetMan with the updated scripts so future objects spawned will use the new scripts.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
An error return value signaling sucess or any particular failure. Anything below 0 is an error signal.<br />
<br />
<br />
===GetAltitude===<br />
Gets the altitide of this' pos (or appropriate low point) over the terrain, in pixels.<br />
<br />
'''Arguments:'''<br />
<br />
* The max altitude you care to check for. 0 Means check the whole scene's height.<br />
* The accuracy within which measurement is acceptable. Higher number here means less calculation.<br />
<br />
'''Return value:'''<br />
<br />
The rough altitude over the terrain, in pixels.<br />
<br />
<br />
===SetWhichMOToNotHit===<br />
Sets this MO to not hit a specific other MO and all its children even though MO hitting is enabled on this [[MovableObject|MovableObject]]<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to the MO to not be hitting. 0 means don't ignore anyhting.<br />
* Ownership is not transferred!<br />
* For how long, in S, to ignore the above. Negative number means forever.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsSetToDelete===<br />
Tells if this MovableObject is marked for deletion at the end of the update.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this is marked for deletion or not.<br />
<br />
<br />
===IsMissionCritical===<br />
Shows whether this is mission critical and therefore should NEVER settle (become dirt) or otherwise be destroyed during the course of a mission.<br />
<br />
'''Arguments:'''<br />
<br />
* None<br />
<br />
'''Return value:'''<br />
<br />
Whether this should be immune to settling and destruction.<br />
<br />
===IsGeneric===<br />
Indicates whether this MO is an Generic or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Generic or not.<br />
<br />
<br />
===IsActor===<br />
Indicates whether this MO is an Actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Actor or not.<br />
<br />
<br />
===IsDevice===<br />
Indicates whether this MO is a Device or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type Device (Held or Thrown) or not.<br />
<br />
<br />
===IsHeldDevice===<br />
Indicates whether this MO is a HeldDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type HeldDevice or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===IsGold===<br />
Indicates whether this MO is made of Gold or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Gold or not.<br />
<br />
<br />
===IsThrownDevice===<br />
Indicates whether this MO is a ThrownDevice or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether this MovableObject is of Type ThrownDevice or not.<br />
<br />
<br />
===HasObject===<br />
Shows whether this is or carries a specifically named object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The Preset name of the object to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object was found carried by this.<br />
<br />
<br />
===HasObjectInGroup===<br />
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.<br />
<br />
'''Arguments:'''<br />
<br />
* The name of the group to look for.<br />
<br />
'''Return value:'''<br />
<br />
Whetehr the object in the group was found carried by this.<br />
<br />
<br />
===AddForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the offset, in METERS, of where the force is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsForce===<br />
Adds force to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the external force vector that will be added to this<br />
* MovableObject and affect its path next Update(). In N or kg * m/s^2.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the offset, in METERS, of where the impulse is being applied relative to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===AddAbsImpulseForce===<br />
Adds impulse force (or instant momentum) to this MovableObject for the next time Update() is called.<br />
<br />
'''Arguments:'''<br />
<br />
* An Vector with the impulse force vector that will directly be added to this MovableObject's momentum next Update(). In kg * m/s.<br />
* A Vector with the absolute world coordinates, in PIXELS, of where the force is being applied to the center of this MovableObject.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearForces===<br />
Clears out all the forces this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===ClearImpulseForces===<br />
Clears out all the impulses this MO has accumulated during this frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===RestDetection===<br />
Does the calculations necessary to detect whether this MO appears to have has settled in the world and is at rest or not. IsAtRest() retreves the answer.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===NotResting===<br />
Makes this MO reset its tiemr that keeps track of how long it's been at rest, effectively delaying it.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===IsAtRest===<br />
Indicates wheter the MovableObject has been at rest (no velocity) for more than one (1) second.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Wheter the MovableObject has been at rest for more than one full second.<br />
<br />
<br />
===MoveOutOfTerrain===<br />
Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.<br />
<br />
'''Arguments:'''<br />
<br />
* Only consider materials stronger than this in the terrain for intersections.<br />
<br />
'''Return value:'''<br />
<br />
Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.<br />
<br />
<br />
===RotateOffset===<br />
Rotates a vector offset from this MORotating's position according to the rotate angle and flipping.<br />
<br />
'''Arguments:'''<br />
<br />
* A const reference the offset Vector to rotate.<br />
<br />
'''Return value:'''<br />
<br />
A new vector that is the result of the rotation.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/LuaDocs/AttachableLuaDocs/Attachable2013-01-25T15:45:29Z<p>Brendan: Whitespace and Capitalization!</p>
<hr />
<div><br />
===Parent: [[MOSRotating|MOSRotating]]===<br />
<br />
'''Concrete Class.''' <br />
An articulated, detachable part of an Actor's body.<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]<br />
<br />
<br />
==Properties==<br />
===ClassName===<br />
The class name of this Entity.A string with the friendly-formatted type name of this object.<br />
<br />
===ParentOffset===<br />
The stored offset between this Attachable's parent's Pos and the joint position. This should be maintained by the parent.<br><br />
A const reference Vector describing the offset from the parent's Pos to the joint point.<br />
<br />
===JointOffset===<br />
Read-only property. The offset to the joint (the point around which this Attachable and its parent hinge) from this Attachable's center of mass/origin.A const reference Vector describing the offset of the joint relative to the this Attachable's origin/center of mass position.<br />
<br />
===JointStiffness===<br />
Sets the normalized stiffness scalar of the join of this Attachable.A float between 0 and 1.0. 1.0 means 100% of all forces imposed on this attachable will be transferred through the joint to the parent. 0.5 means 50%, and so on.<br />
<br />
===RotTarget===<br />
The target rotation that this Attachable should be striving to match its real rotation with, if it is attached. The joint stiffness will determine how strong the scalar spring is between the current rotation and the target set here.A float for the current target angle in radians.<br />
<br />
===AtomSubgroupID===<br />
The subgroup ID of this' Atoms.The the subgroup ID of this' Atoms.<br />
<br />
===OnlyLinearForces===<br />
Indicates whether this AEmitter only cares about linear forces that it creates through emissions, ie no torquing due to the parent offset.Whether only using linear forces or not.<br />
<br />
<br />
==Functions==<br />
===IsAttached===<br />
Indicates whether this Attachable is attached to an MOSprite or not.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether it's attached or not.<br />
<br />
<br />
===IsAttachedTo===<br />
Indicates whether this Attachable is attached to a specific actor or not.<br />
<br />
'''Arguments:'''<br />
<br />
* A pointer to which MOSprite you want to check if this is attached to.<br />
<br />
'''Return value:'''<br />
<br />
Whether it's attached or not.<br />
<br />
<br />
===IsDrawnAfterParent===<br />
Indicates whether this Attachable is to be drawn after (in front of) or before (behind) the parent.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
Whether it's to be drawn after parent or not.<br />
<br />
<br />
===Detach===<br />
Detaches this Attachable from its host [[MOSprite|MOSprite]]<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
None.<br />
<br />
<br />
===TransferJointForces===<br />
Bundles up all the accumulated forces of this Attachable and calcs how they transfer to the joint, and therefore to the parent.<br />
<br />
'''Arguments:'''<br />
<br />
* A vector that will have with the forces affecting the joint ADDED to it.<br />
<br />
'''Return value:'''<br />
<br />
If the accumulated forces exceed the strength of the joint, the attachable will only fill out the forces up to the strength threshold and then detach itself and return false, and the parent should react accordingly in that case (null out pointers to the Attachable).<br />
<br />
<br />
===TransferJointImpulses===<br />
Bundles up all the accumulated impulses of this Attachable and calcs how they transfer to the joint, and therefore to the parent.<br />
<br />
'''Arguments:'''<br />
<br />
* A vector that will have with the imps affecting the joint ADDED to it.<br />
<br />
'''Return value:'''<br />
<br />
If the accumulated impulses exceed the strength of the joint, the attachable will only fill out the impulses up to the strength threshold and then detach itself and return false, and the parent should react accordingly in that case (null out pointers to the Attachable).<br />
<br />
<br />
===CollectDamage===<br />
Gets the amount of damage points this Attachable has sustained and should cause its parent. Calling this will reset the damage count. This should normally be called AFTER Update() to get the correct damage for a given frame.<br />
<br />
'''Arguments:'''<br />
<br />
* None.<br />
<br />
'''Return value:'''<br />
<br />
A float with the damage points accumulated since the last time this method was called.<br />
<br />
<br />
<br />
[[LuaDocs/Index|'''Go back to Class Index''']]</div>Brendanhttps://wiki.datarealms.com/RoninRonin2013-01-25T02:42:00Z<p>Brendan: Just some linking</p>
<hr />
<div>{{Tech<br />
|NameTech = Ronin Tech<br />
|Image = Ronin_Tech.png<br />
|FullName = The Ronin<br />
|InGameDesc = Rag-tag parties of bandits who prey on weak and unsuspecting explorers. Their soldiers are unarmored and weapons primitive, but they manage to get the job done. <br />
|Gameplay = Regular people. Jacks of all trades. Quantity over quality.<br />
|Analogy = Average Joes<br />
|Colors = Tan, Mixed<br />
}}<br />
<br />
<blockquote><big>"These outcasts travel in rusty old ships hoping to prey upon unprepared colonies and transports. They have little or no armour, antique weapons and crazy haircuts. They use bodies belonging to convicts and occasionally some unfortunate civilian who got lobotomised after getting with the wrong crowd. Desperate poor people have also been known to rent their body (with their 'muted' brain still inside) in the hope of being able to afford disembodiment. The ranks of the Ronin are often infused with new blood every time [[Free_Trade | FreeTrade]] kills a star system, i.e. pull out their TradeStars.</big><br><br />
Gameplay: These are regular people, meant to provide a familiar scale. How much does falling 5 meters down on concrete hurt? These guys will illustrate. The hideouts of the Ronin can be used to put familiar furniture into the game. They do not have TradeStar access."[http://androidarts.com/cortexcommand/#ronin]</blockquote><br />
<br />
While demonstrably clones (multiple Mias anyone?), Ronin are distinct among current [[Category:Tech | Techs]] for being distinct characters with names. And instead of generic infantry, each Ronin's individual characteristics lends them to a specific combat role. Otherwise they are much alike in having jetpacks but lacking armor. They have no drones, turrets, or vehicles.<br />
<br />
Called "space vikings" with ethnically Norse members in some official flavor text, the Ronin have also been called freedom fighters and rebels by uncited sources. Though much loved by noteworthy modders, they seem to be black sheep of the Cortex Command universe. Ronin have only officially been featured in the "Zombie Caves" mission as a hit squad trying to prevent the return of a cloning control chip. Whether they were protecting their own property or hired by another party is unclear.<br />
<br />
Their weaponry and tools are outdated 20th century models a few centuries into the future, plus some improvisations. It's unclear where they find these museum pieces in working condition and at cheap prices. They use the scraps no other Techs want, with some inventive additions like the Rocket-Propelled Chainsaw Launcher. <br />
<br />
== Tactics ==<br />
<br />
The Ronin arsenal is cheap but diverse, providing distinct options with multiple entries in almost all categories of weaponry-- likely the key to their "getting the job done". Their infantry can't stand toe-to-toe with those of most Techs, so mobility and striking indirectly are equalizers; Ronin grenades are unusually light weight with standard power. <br />
<br />
Throwing bodies at any problem is the other major approach, as Ronin troops and equipment are cheaper than most. Ronin have weapons to suit any offensive strategy, whether sniping, storming, or tearing apart bunkers with the [[Weapons#RPC_M17 | RPC]]. But time will not be on your side due to their low quality, so quantity is king.<br />
<br />
== The Ronin ==<br />
<br />
Indications from the developers are that the [https://twitter.com/DataRealms/status/220685942577577984 Ronin soldiers will lose most of their individuality in CC 1.0]. But they will have [https://twitter.com/DataRealms/status/220998000321896450 armored variants].<br />
<br />
=== Dafred ===<br />
[[Image:Roninsoldierdafred.png|left|]] <br />
"Dafred is simply awesome." <br><br />
Dafred is the well rounded soldier. Not too weak, not too slow. A great pick when you're not really sure what kind of threat you will have to deal with.<br />
<br />
=== Mia ===<br />
[[Image:Roninsoldiermia.png|left|]]<br />
"Mia is flexible and runs like the wind." <br><br />
If the flavor text didn't give it away, Mia is the Light soldier of the Ronin faction. She is one of the fastest walking actors in the game.<br />
<br />
=== Dimitri ===<br />
[[Image:Roninsoldierdimitri.png|left|]]<br />
"Dimitri is tall and can see pretty far." <br><br />
Despite the potential benefits he has as a sniper, Dimitri is rather weak. He is cheaper than Dafred, but his height makes him a bigger target and less able to squeeze through holes.<br />
<br />
=== Brutus ===<br />
[[Image:Roninsoldierbrutus.png|left|]]<br />
"Brutus is a tough guy, although heavy and slow." <br><br />
The description sums it up quite nicely. Brutus is the "heavy" character of the Ronin faction. Not that useful considering the Ronins do not wear body armour as the Coalition and Browncoats.<br />
<br />
=== Sandra ===<br />
[[Image:Roninsoldiersandra.png|left|]]<br />
"Sandra's sexy hair can make any soldier hesitate." <br><br />
Something about Sandra messes with the AI of enemy soldiers.<br />
<br />
=== Gordon ===<br />
[[Image:Roninsoldiergordon.png|left|]] <br />
"Gordon can soak up bullets, but don't crash into anything if you like living." <br><br />
Similar to the [[Imperatus]] robots, Gordon is highly resistant to damage from bullets. However he is more vulnerable to impact damage, so be careful when jet-packing or fighting [[Dummy#Dummy | Dummies]].<br />
<br />
== Weapons ==<br />
<br />
<div style="text-align:center; margin-right:60px;"><br />
<div style="float:left; width:80px; height:80px;">[[Image:Glock--1X.png]]<br/>[[Weapons#Glock|Glock]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Desert_Eagle--1X.png]]<br/>[[Weapons#Desert_Eagle|Desert Eagle]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Peacemaker--1X.png]]<br/>[[Weapons#Peacemaker|Peacemaker]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Uzi--1X.png]]<br/>[[Weapons#Uzi|Uzi]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Shortgun--1X.png]]<br/>[[Weapons#Shortgun|Shortgun]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Pumpgun--1X.png]]<br/>[[Weapons#Pumpgun | Pumpgun]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Spas_12--1X.png]]<br/>[[Weapons#Spas_12 | Spas 12]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:AK-47--1X.png]]<br/>[[Weapons#AK-47|AK-47]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:M16--1X.png]]<br/>[[Weapons#M16|M16]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:M1_Garand--1X.png]]<br/>[[Weapons#M1_Garand | M1 Garand]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Kar98--1X.png]]<br/>[[Weapons#Kar98 | Kar98]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:M60--1X.png]]<br/>[[Weapons#M60 | M60]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Thumper--1X.png]]<br/>[[Weapons#Thumper | Thumper]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:RPG-7--1X.png]]<br/>[[Weapons#RPG-7 | RPG-7]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:RPC_M17--1X.png]]<br/>[[Weapons#RPC M17 | RPC M17]]</div><br />
</div><br clear="all" /><br />
<br />
== Bombs ==<br />
<div style="text-align:center; margin-right:60px;"><br />
<div style="float:left; width:80px; height:80px;">[[Image:Stone--1X.png]]<br/>[[Bombs#Stone|Stone]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Pineapple_Grenade--1X.png]]<br/>[[Bombs#Pineapple_Grenade|Pineapple Grenade]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Stick_Grenade--1X.png]]<br/>[[Bombs#Stick_Grenade|Stick Grenade]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Molotov_Cocktail--1X.png]]<br/>[[Bombs#Molotov_Cocktail|Molotov Cocktail]]</div><br />
</div><br clear="all" /><br />
<br />
== Tools ==<br />
<div style="text-align:center; margin-right:60px;"><br />
<div style="float:left; width:80px; height:80px;">[[Image:Chainsaw--1X.png]]<br/>[[Tools#Chainsaw|Chainsaw]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Shovel--1X.png]]<br/>[[Tools#Shovel|Shovel]]</div><br />
</div><br clear="all" /><br />
<br />
<br />
[[Category:Tech]]</div>Brendanhttps://wiki.datarealms.com/ActorsActors2013-01-25T02:39:45Z<p>Brendan: Braaaaaaaains....</p>
<hr />
<div>General class of game objects that move under AI control and, typically, the player's. Each type starts with "A" for Actor and has specific requirements.<br />
<br />
<br />
== Actors ==<br />
[[File:Braincase1.png]] &nbsp; [[File:Dummycontroller1.png]]<br />
<br />
The [[Free_Trade#Brain_Case | Brain Case]] is defined simply as an "Actor", as is the [[Dummy#Dummy_Controller | Dummy Controller]]. Using the most generic instance of the general Actor class, these have little more than a "body", health, and the ability to use the Buy menu. They have no limbs or parts and so cannot move.<br />
<br />
''Note: Brainbots are "AHuman" type (see below), not just "Actor"s.''<br />
<br />
== Humanoids ==<br />
'''Main Article: [[AHuman]]'''<br />
<br />
<br />
[[File:Roninsoldierdafred.png]] &nbsp; [[File:Jumper.png]] &nbsp; [[File:Zombiemedium.png]]<br />
<br />
Coded as "AHuman", humanoids are ''soft'' bodies controlled by the AI or Player. Their main distinction is standing upright and bipedal walking. <br />
<br />
The type supports a main body, a head, two legs, two arms, and a jetpack (see Ronin [[Ronin#Dafred | Dafred]] above). Arms and legs can sport hands and feet. [[Wildlife#Jumper | Jumper]] hop-walks on its one leg. <br />
<br />
The foreground arm is required to use Devices but not to carry them in inventory; the background arm to use Shields. Minimally an AHuman requires a body and head. <br />
<br />
Most humanoids are equipped with jetpacks, but the [[Free_Trade#Culled_Clones | Culled Clones]] (aka Undead or Zombies prior to Build 27) and Jumper are defined with a "Jetpack = AEmitter" which looks and acts more like jumping.<br />
<br />
== Crabs ==<br />
'''Main Article: [[ACrab]]'''<br />
<br />
<br />
[[File:Crab-1x.png]] &nbsp; [[File:Coalitiondrone.png]] &nbsp; [[File:Dummysmallturret.png]]<br />
<br />
Coded as "ACrab", crabs lack any upright constraints for standing (leading to wobbling) and use a quadrapedal walk-- unlike their real-life counterparts, crabs in Cortex Command have only four legs.<br />
<br />
The type supports a main body, foreground and background legs on the left and right, left and right feet, and a turret which can be equipped with one [[Weapons | weapon]] or [[Tools | tool]]; ACrab cannot drop or pick up anything. <br />
<br />
Stationary "Turret" actors are made with legs that are invisible and too small to use, like the [[Dummy]] [[Dummy#Dummy_Small_Turret | Small Turret]]<br />
<br />
Crabs do not use jetpacks as such; their lack of upright constraints makes flight control unstable. If they have a "Jetpack" definition it uses an AEmitter that behaves like jumping, which is the main attack of the rare [[Wildlife#Mega_Crab | Mega Crab]]. That, and landing...<br />
<br />
Without a "Turret" defined, crabs can't use any items, though ones can be added to the crab's inventory. These are exposed when the crab dies; thus one can make kamikaze "Bomb Crabs" (see also [[Crab_Bomb | Crab Bomb]]).<br />
<br />
== Doors ==<br />
'''Main Article: [[ADoor]]'''<br />
<br />
<br />
Doors open for Actors of the same team automatically and close when no one is around, or when an enemy is near. They cannot be controlled as other Actor units can. All current doors are slabs of metal that either slide or rotates on a fixed path. Other than the vertical "Door A", all current doors come pre-fitted into a bunker module.<br />
<br />
== Craft ==<br />
'''Main Articles: [[ACRocket]], [[ACDropship]]'''<br />
<br />
<br />
[[File:Dummydropcrate.png]] &nbsp; [[File:Dummyrocklet.png]] &nbsp; [[File:DropShipMk1-1x.png]]<br />
<br />
Coded "ACRocket" or "ACDropship" ("AC" is an analgram of ''Actor'' and ''Craft'') all Craft have one or more have hatches by which Actors, [[Bombs]], and handheld devices can exit or enter. Almost all are airborne vehicles using Jetpack emitters, with the exception of the '''Crate''', which is an ACRocket without legs or jetpacks. They simply obey gravity. <br />
<br />
Craft flying past the top the map return to [[Free_Trade#TradeStar_Midas | TradeStar Midas]], adding to the player's gold the value of the craft's cargo and its buy price minus percent of its health lost.<br />
<br />
Craft serve various purposes, such as:<br />
* Transporting Units<br />
* Bombing Enemies<br />
* Evacuating Units<br />
* Shelter / Hiding Place<br />
* Transporting Equipment<br />
* Stealing Equipment<br />
* Slave Raiding<br />
...but basically dropping and retrieving cargo.<br />
<br />
<br />
[[Category: Modding]]</div>Brendanhttps://wiki.datarealms.com/OffsetsOffsets2013-01-25T02:28:39Z<p>Brendan: Hip to be unsure that's correct...</p>
<hr />
<div>Offsets define relative positions of many things in Cortex Command. They describe individual points which the game engine maps to individual pixels within [http://en.wikipedia.org/wiki/Sprite_%28computer_graphics%29 sprites] as they move and rotate on screen. Those points are used to position a sprite in relation to another sprite, such as the shoulder joint on an arm sprite and the corresponding shoulder on its "parent" torso sprite. They define where things are, like the [[HDFirearm | gun]] carried by a [[AHuman | soldier]], and also where things are emitted from, like the bullets from that gun.<br />
<br />
You'll need to understand [http://en.wikipedia.org/wiki/Cartesian_coordinate_system Cartesian coordinates] and arithmetic with positive and negative numbers. Offset values are usually [http://en.wikipedia.org/wiki/Integer integers] but Offsets accept [http://en.wikipedia.org/wiki/Floating_point float values] (most often just "_.5"). Though you'll never see half a pixel, Cortex Command's math does. Inaccurate values create inaccuracies in drawing pixels. <br />
<br />
And if you understand [http://www.khanacademy.org/math/linear-algebra/v/linear-algebra--vector-examples vectors], you'll understand positioning Offsets relative to other Offsets, almost always done relative to the SpriteOffset. <br><br />
<br />
== SpriteOffset ==<br />
<br />
If sprites in Cortex Command were paper drawings, cut out and pinned to a cork board, the SpriteOffset would be where the push pin goes though the cutout. If you spin the cutout, it spins around the pin. In physics, things spin around their own [http://en.wikipedia.org/wiki/Center_of_mass center of mass]. The SpriteOffset provides something similar.<br />
<br />
=== Coordinates & Pixels ===<br />
Cortex Command uses pixels, not paper, and pixels have [http://en.wikipedia.org/wiki/Integer integer] coordinates. A coordinate system needs an origin: ''X = 0, Y = 0''. Cortex Command uses the SpriteOffset as the origin for each sprite, and all other Offsets are distances, or [http://www.khanacademy.org/math/linear-algebra/v/linear-algebra--vector-examples vectors], measured from the SpriteOffset measured in pixel lengths on the X and Y axes. <br><br />
If you open a sprite's image file in an image editor (MS Paint, GIMP, Photoshop, etc.), the coordinates of every pixel is a positive integer value, and it's the pixel up in the top left which has the coordinate ''(0,0)''. But this pixel probably shouldn't represent the center of mass. <br><br />
Instead of a push pin positioned over paper, think of positioning over the pixels of the image an invisible, purely mathematical pixel which, by default, is squarely over that top left pixel in the image. This is the SpriteOffset and it can be offset any distance along the X and Y axes, on or off the image, whole or decimal lengths from its natural starting place over (0,0). <br />
<br />
==== Which Axis Is Flipped? ====<br />
There are two ways of looking at how to find coordinates to position Offsets. <br><br />
More mathematically true is the perspective of moving the pin/pixel over the paper/image from the natural origin in the top left. In Cortex Command, one axis has its positive and negative reversed from the Cartesian model; and in this "pin" perspective the X-axis is flipped so right is negative and left is positive. It also means measuring vectors of "child" Offsets back to the SpriteOffset of the parent sprite. <br><br />
The other perspective is more true to how things look in game since Cortex Command moves sprites via their SpriteOffset and visually appear to extending down and to the right from it with ''X = 0'' and ''Y = 0''. This perspective holds the pin/pixel still while moving the paper/image underneath it, typically to the left and up. In this perspective the Y-axis is flipped so up is negative and down is positive. It also means you measure vectors out from the SpriteOffset out to any "child" Offsets. <br><br />
Which perspective you use is irrelevant as the numbers you enter will be the same. '''Just be consistent.'''<br />
<br />
=== Centering the Odds of Evening ===<br />
Typically the SpriteOffset will define a pixel in the very center of the sprite, though official examples such as the [[Dummy#Dummy | Dummy infantry]] position it centered only on the X-axis and low to the hip on the Y-axis. Since sprites are horizontally mirrored, or "HFlipped", to face left, visual popping may occur if the X value of the SpriteOffset is off-center on the X-axis. The Y-axis is more forgiving. <br />
<br />
Positioning the SpriteOffset can be tricky because image sizes are reported as a count of the total number of pixels. A 5x5 image has pixels ranging from (0,0) only up to (4,4). Typically it's easier to find the image size than the coordinate of the bottom right pixel. The middle can be found by subtracting 1 from width or height and dividing by 2. Offsets accept decimal, or [http://en.wikipedia.org/wiki/Floating_point float], values. <br><br />
Even numbered WxH size, to have an equal number of pixels to either side (left & right, above & below) the SpriteOffset, would have ''_.5'' values; or you can just divide width and height in half and it's good enough. Odd numbered widths more consistently map to a specific pixel even as the sprite spins around. <br><br />
<br />
To put the center of mass where, visually, it ought to be ''and'' avoid visual popping, it may be wisest to enlarge the canvas as needed to keep an equal number of pixels horizontally (and perhaps vertically) on either side of the center of mass pixel when setting it as the SpriteOffset.<br />
<br />
<br />
== Offset ==<br />
<br />
Used by Exit hatches on [[ACRocket | ACRockets]] and Terrain material bitmaps. Also used by the Gib entity; this is best left to the Gib Editor included in Cortex Command.<br />
<br />
<br />
== Bitmap Offset ==<br />
<br />
Used for static elements on a map, including TerrainObject set pieces, Bunker Backgrounds and Bunker Bits, as well as the old Brain Vault, Rocket Silo, and Wall. Almost all of their vectors are 0,0 but certain Geology objects and the three old Bunker modules use negative vectors.<br />
<br />
<br />
== EmissionOffset ==<br />
<br />
Used by [[AEmitter]] entities to define which pixel the things it emits are emitted from, in many ways similar to [[Offsets#MuzzleOffset | MuzzleOffset]].<br />
<br />
<br />
== ParentOffset ==<br />
<br />
Used when attaching a "child" sprite, the ParentOffset defines a point relative to the "parent" sprite's SpriteOffset which the child's JointOffset will attach to. For example, it defines a shoulder socket which the arm's shoulder forms a joint with. [[HDFirearm | HDFirearms]] use ParentOffset to define a receiver which the Magazine's JointOffset will snap into. The child is typically a sprite or an [[AEmitter]].<br />
<br />
<br />
== JointOffset ==<br />
<br />
Used when attaching as a "child" to a "parent" sprite, the JointOffset defines a point relative to the child sprite's SpriteOffset which the parent can grab onto and position on itself using it's ParentOffset. Parts of an [[Actors | Actor's]] body are joined to each other with via JointOffset, as are various [[Devices]] like guns and tools. This applies to Actor types like [[ADoor]], [[ACRocket]], and [[ACDropShip]]. Attachable effects and [[AEmitter]] also use this.<br />
<br />
For [[HDFirearm]]s, the JointOffset is where the FGArm (foreground arm) Hand is positioned, typically where the trigger is drawn but it has no effect on firing the [[Weapons | weapon]] or [[Tools | tool]]. If placed too far for an AHuman's Hand to reach, the arm will twitch, trying and failing to reach the JointOffset.<br />
<br />
<br />
== Device-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Devices]]: [[HeldDevice]]s, [[HDFirearm]]s, or [[TDExplosive]]s.<br />
<br />
=== SupportOffset ===<br />
<br />
This defines where the BGArm (background arm) Hand of AHuman is positioned on a Device. Even one-handed devices specify a SupportOffset, though it tends to be close to the JointOffset. Excessive values have the same effect on the BGArm as excessive [[Offsets#JointOffset | JointOffsets]] have on the FGArm.<br />
<br />
=== StanceOffset ===<br />
<br />
Adjustment where the SpriteOffset of a [[HeldDevice]], [[HDFirearm]], or [[ThrownDevice]] lines up with the SpriteOffset of the [[Actors]] carrying it. If a Device is meant to be carried high, slung low, held forward, or tucked back, this is where it should be specified, not SpriteOffset. Note that changing the StanceOffset '''does not change other Offsets'''-- they remain relative to SpriteOffset only. However, excessive values on StanceOffset can put other Offsets beyond reach of an AHuman's Hands.<br />
<br />
=== SharpStanceOffset ===<br />
<br />
Adjustments where a [[HeldDevice]] or [[HDFirearm]] and an Actor's [[Offsets#SpriteOffset | SpriteOffsets]] align, but only when stopping to aim. Most weapons (and even the [[Tools#Diggers | diggers]], for some reason) are carried higher to "look down the sights" though it can be set arbitrarily. Like SupportOffset, all other Offsets on the Device stay relative to the SpriteOffset, thus the "move with" the Device.<br />
<br />
=== MuzzleOffset ===<br />
<br />
Defines the pixel where any Round an [[HDFirearm]] fires are emitted from. Typically this is the forward tip of the barrel, but it can be placed arbitrarily, even outside the sprite's pixel area.<br />
<br />
=== EjectionOffset ===<br />
<br />
The pixel where any Shell will be emitted from the sprite of an HDFirearm. <br />
<br />
<br />
=== StartThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5).<br />
<br />
=== EndThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5) but sometise (12,-5).<br />
<br />
<br />
== Actor-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Actors]]: [[AHuman]]s, [[ACrab]]s, [[ACRocket]]s, [[ACDropShip]]s, or [[ADoor]]s.<br />
<br />
=== IdleOffset ===<br />
<br />
Specified in Arm and Leg definitions to position their Hand and Foot respectively when those limbs are idle. Specifies a point relative to the JointOffset to position the Hand or Foot rather than a specific Parent-Joint attachment. Works in concert with MaxLength to keep Hands and Feet from visually separating from their Arm or Leg. Appears in all Actor definitions except [[ACDropship]] and [[ADoor]] and stationary Brains.<br />
<br />
=== ExtendedOffset ===<br />
<br />
Defines where the Foot of an Actor is positioned relative to the Leg's JointOffset when standing. Note that these coordinates assume the Leg being oriented horizontally as the sprites for them are.<br />
<br />
=== ContractedOffset ===<br />
<br />
Used when crouching, this defines where the Foot of an Actor is positioned relative to the Leg's JointOffset. Note that these coordinates assume the Leg being oriented horizontally as sprites for them are.<br />
<br />
=== StartOffset ===<br />
<br />
Used in the various LimbPath animation definitions, this specifies the hip joint ParentOffset of the Actor where the JointOffset of its Leg is attached [http://forums.datarealms.com/viewtopic.php?f=1&t=13483].<br />
<br />
=== HolsterOffset ===<br />
<br />
Not commonly used, if at all. Cortex Command currently does not "holster" any items when unequipped. Appears in both AHuman and ACRocket definitions.<br />
<br />
<br />
=== OpenOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when it opens.<br />
<br />
=== ClosedOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when the door is closed.<br />
<br />
<br />
[[Category:Modding]]</div>Brendanhttps://wiki.datarealms.com/OffsetsOffsets2013-01-25T02:21:06Z<p>Brendan: Relative improvement</p>
<hr />
<div>Offsets define relative positions of many things in Cortex Command. They describe individual points which the game engine maps to individual pixels within [http://en.wikipedia.org/wiki/Sprite_%28computer_graphics%29 sprites] as they move and rotate on screen. Those points are used to position a sprite in relation to another sprite, such as the shoulder joint on an arm sprite and the corresponding shoulder on its "parent" torso sprite. They define where things are, like the [[HDFirearm | gun]] carried by a [[AHuman | soldier]], and also where things are emitted from, like the bullets from that gun.<br />
<br />
You'll need to understand [http://en.wikipedia.org/wiki/Cartesian_coordinate_system Cartesian coordinates] and arithmetic with positive and negative numbers. Offset values are usually [http://en.wikipedia.org/wiki/Integer integers] but Offsets accept [http://en.wikipedia.org/wiki/Floating_point float values] (most often just "_.5"). Though you'll never see half a pixel, Cortex Command's math does. Inaccurate values create inaccuracies in drawing pixels. <br />
<br />
And if you understand [http://www.khanacademy.org/math/linear-algebra/v/linear-algebra--vector-examples vectors], you'll understand positioning Offsets relative to other Offsets, almost always done relative to the SpriteOffset. <br><br />
<br />
== SpriteOffset ==<br />
<br />
If sprites in Cortex Command were paper drawings, cut out and pinned to a cork board, the SpriteOffset would be where the push pin goes though the cutout. If you spin the cutout, it spins around the pin. In physics, things spin around their own [http://en.wikipedia.org/wiki/Center_of_mass center of mass]. The SpriteOffset provides something similar.<br />
<br />
=== Coordinates & Pixels ===<br />
Cortex Command uses pixels, not paper, and pixels have [http://en.wikipedia.org/wiki/Integer integer] coordinates. A coordinate system needs an origin: ''X = 0, Y = 0''. Cortex Command uses the SpriteOffset as the origin for each sprite, and all other Offsets are distances, or [http://www.khanacademy.org/math/linear-algebra/v/linear-algebra--vector-examples vectors], measured from the SpriteOffset measured in pixel lengths on the X and Y axes. <br><br />
If you open a sprite's image file in an image editor (MS Paint, GIMP, Photoshop, etc.), the coordinates of every pixel is a positive integer value, and it's the pixel up in the top left which has the coordinate ''(0,0)''. But this pixel probably shouldn't represent the center of mass. <br><br />
Instead of a push pin positioned over paper, think of positioning over the pixels of the image an invisible, purely mathematical pixel which, by default, is squarely over that top left pixel in the image. This is the SpriteOffset and it can be offset any distance along the X and Y axes, on or off the image, whole or decimal lengths from its natural starting place over (0,0). <br />
<br />
==== Which Axis Is Flipped? ====<br />
There are two ways of looking at how to find coordinates to position Offsets. <br><br />
More mathematically true is the perspective of moving the pin/pixel over the paper/image from the natural origin in the top left. In Cortex Command, one axis has its positive and negative reversed from the Cartesian model; and in this "pin" perspective the X-axis is flipped so right is negative and left is positive. It also means measuring vectors of "child" Offsets back to the SpriteOffset of the parent sprite. <br><br />
The other perspective is more true to how things look in game since Cortex Command moves sprites via their SpriteOffset and visually appear to extending down and to the right from it with ''X = 0'' and ''Y = 0''. This perspective holds the pin/pixel still while moving the paper/image underneath it, typically to the left and up. In this perspective the Y-axis is flipped so up is negative and down is positive. It also means you measure vectors out from the SpriteOffset out to any "child" Offsets. <br><br />
Which perspective you use is irrelevant as the numbers you enter will be the same. '''Just be consistent.'''<br />
<br />
=== Centering the Odds of Evening ===<br />
Typically the SpriteOffset will define a pixel in the very center of the sprite, though official examples such as the [[Dummy#Dummy | Dummy infantry]] position it centered only on the X-axis and low to the hip on the Y-axis. Since sprites are horizontally mirrored, or "HFlipped", to face left, visual popping may occur if the X value of the SpriteOffset is off-center on the X-axis. The Y-axis is more forgiving. <br />
<br />
Positioning the SpriteOffset can be tricky because image sizes are reported as a count of the total number of pixels. A 5x5 image has pixels ranging from (0,0) only up to (4,4). Typically it's easier to find the image size than the coordinate of the bottom right pixel. The middle can be found by subtracting 1 from width or height and dividing by 2. Offsets accept decimal, or [http://en.wikipedia.org/wiki/Floating_point float], values. <br><br />
Even numbered WxH size, to have an equal number of pixels to either side (left & right, above & below) the SpriteOffset, would have ''_.5'' values; or you can just divide width and height in half and it's good enough. Odd numbered widths more consistently map to a specific pixel even as the sprite spins around. <br><br />
<br />
To put the center of mass where, visually, it ought to be ''and'' avoid visual popping, it may be wisest to enlarge the canvas as needed to keep an equal number of pixels horizontally (and perhaps vertically) on either side of the center of mass pixel when setting it as the SpriteOffset.<br />
<br />
<br />
== Offset ==<br />
<br />
Used by Exit hatches on [[ACRocket | ACRockets]] and Terrain material bitmaps. Also used by the Gib entity; this is best left to the Gib Editor included in Cortex Command.<br />
<br />
<br />
== Bitmap Offset ==<br />
<br />
Used for static elements on a map, including TerrainObject set pieces, Bunker Backgrounds and Bunker Bits, as well as the old Brain Vault, Rocket Silo, and Wall. Almost all of their vectors are 0,0 but certain Geology objects and the three old Bunker modules use negative vectors.<br />
<br />
<br />
== EmissionOffset ==<br />
<br />
Used by [[AEmitter]] entities to define which pixel the things it emits are emitted from, in many ways similar to [[Offsets#MuzzleOffset | MuzzleOffset]].<br />
<br />
<br />
== ParentOffset ==<br />
<br />
Used when attaching a "child" sprite, the ParentOffset defines a point relative to the "parent" sprite's SpriteOffset which the child's JointOffset will attach to. For example, it defines a shoulder socket which the arm's shoulder forms a joint with. [[HDFirearm | HDFirearms]] use ParentOffset to define a receiver which the Magazine's JointOffset will snap into. The child is typically a sprite or an [[AEmitter]].<br />
<br />
<br />
== JointOffset ==<br />
<br />
Used when attaching as a "child" to a "parent" sprite, the JointOffset defines a point relative to the child sprite's SpriteOffset which the parent can grab onto and position on itself using it's ParentOffset. Parts of an [[Actors | Actor's]] body are joined to each other with via JointOffset, as are various [[Devices]] like guns and tools. This applies to Actor types like [[ADoor]], [[ACRocket]], and [[ACDropShip]]. Attachable effects and [[AEmitter]] also use this.<br />
<br />
For [[HDFirearm]]s, the JointOffset is where the FGArm (foreground arm) Hand is positioned, typically where the trigger is drawn but it has no effect on firing the [[Weapons | weapon]] or [[Tools | tool]]. If placed too far for an AHuman's Hand to reach, the arm will twitch, trying and failing to reach the JointOffset.<br />
<br />
<br />
== Device-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Devices]]: [[HeldDevice]]s, [[HDFirearm]]s, or [[TDExplosive]]s.<br />
<br />
=== SupportOffset ===<br />
<br />
This defines where the BGArm (background arm) Hand of AHuman is positioned on a Device. Even one-handed devices specify a SupportOffset, though it tends to be close to the JointOffset. Excessive values have the same effect on the BGArm as excessive [[Offsets#JointOffset | JointOffsets]] have on the FGArm.<br />
<br />
=== StanceOffset ===<br />
<br />
Adjustment where the SpriteOffset of a [[HeldDevice]], [[HDFirearm]], or [[ThrownDevice]] lines up with the SpriteOffset of the [[Actors]] carrying it. If a Device is meant to be carried high, slung low, held forward, or tucked back, this is where it should be specified, not SpriteOffset. Note that changing the StanceOffset '''does not change other Offsets'''-- they remain relative to SpriteOffset only. However, excessive values on StanceOffset can put other Offsets beyond reach of an AHuman's Hands.<br />
<br />
=== SharpStanceOffset ===<br />
<br />
Adjustments where a [[HeldDevice]] or [[HDFirearm]] and an Actor's [[Offsets#SpriteOffset | SpriteOffsets]] align, but only when stopping to aim. Most weapons (and even the [[Tools#Diggers | diggers]], for some reason) are carried higher to "look down the sights" though it can be set arbitrarily. Like SupportOffset, all other Offsets on the Device stay relative to the SpriteOffset, thus the "move with" the Device.<br />
<br />
=== MuzzleOffset ===<br />
<br />
Defines the pixel where any Round an [[HDFirearm]] fires are emitted from. Typically this is the forward tip of the barrel, but it can be placed arbitrarily, even outside the sprite's pixel area.<br />
<br />
=== EjectionOffset ===<br />
<br />
The pixel where any Shell will be emitted from the sprite of an HDFirearm. <br />
<br />
<br />
=== StartThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5).<br />
<br />
=== EndThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5) but sometise (12,-5).<br />
<br />
<br />
== Actor-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Actors]]: [[AHuman]]s, [[ACrab]]s, [[ACRocket]]s, [[ACDropShip]]s, or [[ADoor]]s.<br />
<br />
=== IdleOffset ===<br />
<br />
Specified in Arm and Leg definitions to position their Hand and Foot respectively when those limbs are idle. Specifies a point relative to the JointOffset to position the Hand or Foot rather than a specific Parent-Joint attachment. Works in concert with MaxLength to keep Hands and Feet from visually separating from their Arm or Leg. Appears in all Actor definitions except [[ACDropship]] and [[ADoor]] and stationary Brains.<br />
<br />
=== ExtendedOffset ===<br />
<br />
Defines where the Foot of an Actor is positioned relative to the Leg's JointOffset when standing. Note that these coordinates assume the Leg being oriented horizontally as the sprites for them are.<br />
<br />
=== ContractedOffset ===<br />
<br />
Used when crouching, this defines where the Foot of an Actor is positioned relative to the Leg's JointOffset. Note that these coordinates assume the Leg being oriented horizontally as sprites for them are.<br />
<br />
=== StartOffset ===<br />
<br />
Used in the various LimbPath animation definitions, this specifies a target coordinate for the Limb to move to.<br />
<br />
=== HolsterOffset ===<br />
<br />
Not commonly used, if at all. Cortex Command currently does not "holster" any items when unequipped. Appears in both AHuman and ACRocket definitions.<br />
<br />
<br />
=== OpenOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when it opens.<br />
<br />
=== ClosedOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when the door is closed.<br />
<br />
<br />
[[Category:Modding]]</div>Brendanhttps://wiki.datarealms.com/OffsetsOffsets2013-01-25T02:20:36Z<p>Brendan: Relative improvement</p>
<hr />
<div>Offsets define relative positions of many things in Cortex Command. They describe individual points which the game engine maps to individual pixels within [http://en.wikipedia.org/wiki/Sprite_%28computer_graphics%29 sprites] as they move and rotate on screen. Those points are used to position a sprite in relation to another sprite, such as the shoulder joint on an arm sprite and the corresponding shoulder on its "parent" torso sprite. They define where things are, like the [[HDFirearm | gun]] carried by a [[AHuman | soldier]], and also where things are emitted from, like the bullets from that gun.<br />
<br />
You'll need to understand [http://en.wikipedia.org/wiki/Cartesian_coordinate_system Cartesian coordinates] and arithmetic with positive and negative numbers. Offset values are usually [http://en.wikipedia.org/wiki/Integer integers] but Offsets accept [http://en.wikipedia.org/wiki/Floating_point float values] (most often just "_.5"). Though you'll never see half a pixel, Cortex Command's math does. Inaccurate values create inaccuracies in drawing pixels. <br />
<br />
And if you understand [http://www.khanacademy.org/math/linear-algebra/v/linear-algebra--vector-examples vectors], you'll understand positioning Offsets relative to other Offsets, almost always done relative to the SpriteOffset. <br><br />
<br />
== SpriteOffset ==<br />
<br />
If sprites in Cortex Command were paper drawings, cut out and pinned to a cork board, the SpriteOffset would be where the push pin goes though the cutout. If you spin the cutout, it spins around the pin. In physics, things spin around their own [http://en.wikipedia.org/wiki/Center_of_mass center of mass]. The SpriteOffset provides something similar.<br />
<br />
=== Coordinates & Pixels ===<br />
Cortex Command uses pixels, not paper, and pixels have [http://en.wikipedia.org/wiki/Integer integer] coordinates. A coordinate system needs an origin: ''X = 0, Y = 0''. Cortex Command uses the SpriteOffset as the origin for each sprite, and all other Offsets are distances, or [http://www.khanacademy.org/math/linear-algebra/v/linear-algebra--vector-examples vectors], measured from the SpriteOffset measured in pixel lengths on the X and Y axes. <br><br />
If you open a sprite's image file in an image editor (MS Paint, GIMP, Photoshop, etc.), the coordinates of every pixel is a positive integer value, and it's the pixel up in the top left which has the coordinate ''(0,0)''. But this pixel probably shouldn't represent the center of mass. <br><br />
Instead of a push pin positioned over paper, think of positioning over the pixels of the image an invisible, purely mathematical pixel which, by default, is squarely over that top left pixel in the image. This is the SpriteOffset and it can be offset any distance along the X and Y axes, on or off the image, whole or decimal lengths from its natural starting place over (0,0). <br />
<br />
==== Which Axis Is Flipped? ====<br />
There are two ways of looking at how to find coordinates to position Offsets. <br><br />
More mathematically true is the perspective of moving the pin/pixel over the paper/image from the natural origin in the top left. In Cortex Command, one axis has its positive and negative reversed from the Cartesian model; and in this "pin" perspective the X-axis is flipped so right is negative and left is positive. It also means measuring vectors of "child" Offsets back to the SpriteOffset of the parent sprite. <br><br />
The other perspective is more true to how things look in game since Cortex Command moves sprites via their SpriteOffset and visually appear to extending down and to the right from it with ''X = 0'' and ''Y = 0''. This perspective holds the pin/pixel still while moving the paper/image underneath it, typically to the left and up. In this perspective the Y-axis is flipped so up is negative and down is positive. It also means you measure vectors out from the SpriteOffset out to any "child" Offsets. <br><br />
Which perspective you use is irrelevant as the numbers you enter will be the same. '''Just be consistent.'''<br />
<br />
=== Centering the Odds of Evening ===<br />
Typically the SpriteOffset will define a pixel in the very center of the sprite, though official examples such as the [[Dummy#Dummy | Dummy infantry]] position it centered only on the X-axis and low to the hip on the Y-axis. Since sprites are horizontally mirrored, or "HFlipped", to face left, visual popping may occur if the X value of the SpriteOffset is off-center on the X-axis. The Y-axis is more forgiving. <br />
<br />
Positioning the SpriteOffset can be tricky because image sizes are reported as a count of the total number of pixels. A 5x5 image has pixels ranging from (0,0) only up to (4,4). Typically it's easier to find the image size than the coordinate of the bottom right pixel. The middle can be found by subtracting 1 from width or height and dividing by 2. Offsets accept decimal, or [http://en.wikipedia.org/wiki/Floating_point float], values. <br><br />
Even numbered WxH size, to have an equal number of pixels to either side (left & right, above & below) the SpriteOffset, would have ''_.5'' values; or you can just divide width and height in half and it's good enough. Odd numbered widths more consistently map to a specific pixel even as the sprite spins around. <br><br />
<br />
To put the center of mass where, visually, it ought to be ''and'' avoid visual popping, it may be wisest to enlarge the canvas as needed to keep an equal number of pixels horizontally (and perhaps vertically) on either side of the center of mass pixel when setting it as the SpriteOffset.<br />
<br />
<br />
== Offset ==<br />
<br />
Used by Exit hatches on [[ACRocket | ACRockets]] and Terrain material bitmaps. Also used by the Gib entity; this is best left to the Gib Editor included in Cortex Command.<br />
<br />
<br />
== Bitmap Offset ==<br />
<br />
Used for static elements on a map, including TerrainObject set pieces, Bunker Backgrounds and Bunker Bits, as well as the old Brain Vault, Rocket Silo, and Wall. Almost all of their vectors are 0,0 but certain Geology objects and the three old Bunker modules use negative vectors.<br />
<br />
<br />
== EmissionOffset ==<br />
<br />
Used by [[AEmitter]] entities to define which pixel the things it emits are emitted from, in many ways similar to [[Offsets#MuzzleOffset | MuzzleOffset]].<br />
<br />
<br />
== ParentOffset ==<br />
<br />
Used when attaching a "child" sprite, the ParentOffset defines a point relative to the "parent" sprite's SpriteOffset which the child's JointOffset will attach to. For example, it defines a shoulder socket which the arm's shoulder forms a joint with. [[HDFirearm | HDFirearms]] use ParentOffset to define a receiver which the Magazine's JointOffset will snap into. The child is typically a sprite or an [[AEmitter]].<br />
<br />
<br />
== JointOffset ==<br />
<br />
Used when attaching as a "child" to a "parent" sprite, the JointOffset defines a point relative to the child sprite's SpriteOffset which the parent can grab onto and position on itself using it's ParentOffset. Parts of an [[Actors | Actor's]] body are joined to each other with via JointOffset, as are various [[Devices]] like guns and tools. This applies to Actor types like [[ADoor]], [[ACRocket]], and [[ACDropShip]]. Attachable effects and [[AEmitter]] also use this.<br />
<br />
For [[HDFirearm]]s, the JointOffset is where the FGArm (foreground arm) Hand is positioned, typically where the trigger is drawn but it has no effect on firing the [[Weapons | weapon]] or [[Tools | tool]]. If placed too far for an AHuman's Hand to reach, the arm will twitch, trying and failing to reach the JointOffset.<br />
<br />
<br />
== Device-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Devices]]: [[HeldDevice]]s, [[HDFirearm]]s, or [[TDExplosive]]s.<br />
<br />
=== SupportOffset ===<br />
<br />
This defines where the BGArm (background arm) Hand of AHuman is positioned on a Device. Even one-handed devices specify a SupportOffset, though it tends to be close to the JointOffset. Excessive values have the same effect on the BGArm as excessive [[Offsets#JointOffset | JointOffsets]] have on the FGArm.<br />
<br />
=== StanceOffset ===<br />
<br />
Adjustment where the SpriteOffset of a [[HeldDevice]], [[HDFirearm]], or [[ThrownDevice]] lines up with the SpriteOffset of the [[Actors]] carrying it. If a Device is meant to be carried high, slung low, held forward, or tucked back, this is where it should be specified, not SpriteOffset. Note that changing the StanceOffset '''does not change other Offsets'''-- they remain relative to SpriteOffset only. However, excessive values on StanceOffset can put other Offsets beyond reach of an AHuman's Hands.<br />
<br />
=== SharpStanceOffset ===<br />
<br />
Adjustments where a [[HeldDevice]] or [[HDFirearm]] and an Actor's [[Offsets#SpriteOffset | SpriteOffsets]] align, but only when stopping to aim. Most weapons (and even the [[Tools#Diggers | diggers]], for some reason) are carried higher to "look down the sights" though it can be set arbitrarily. Like SupportOffset, all other Offsets on the Device stay relative to the SpriteOffset, thus the "move with" the Device.<br />
<br />
=== MuzzleOffset ===<br />
<br />
Defines the pixel where any Round an [[HDFirearm]] fires are emitted from. Typically this is the forward tip of the barrel, but it can be placed arbitrarily, even outside the sprite's pixel area.<br />
<br />
=== EjectionOffset ===<br />
<br />
The pixel where any Shell will be emitted from the sprite of an HDFirearm. <br />
<br />
<br />
=== StartThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5).<br />
<br />
=== EndThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5) but sometise (12,-5).<br />
<br />
<br />
== Actor-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Actors]]: [[AHuman]]s, [[ACrab]]s, [[ACRocket]]s, [[ACDropShip]]s, or [[ADoor]]s.<br />
<br />
=== IdleOffset ===<br />
<br />
Specified in Arm and Leg definitions to position their Hand and Foot respectively when those limbs are idle. Specifies a point relative to the JointOffset to position the Hand or Foot rather than a specific Parent-Joint attachment. Works in concert with MaxLength to keep Hands and Feet from visually separating from their Arm or Leg. Appears in all Actor definitions except [[ACDropship]] and [[ADoor]] and stationary Brains.<br />
<br />
=== ExtendedOffset ===<br />
<br />
Defines where the Foot of an Actor is positioned relative to the Leg's JointOffset when standing. Note that these coordinates assume the Leg being oriented horizontally as the sprites for them are.<br />
<br />
=== ContractedOffset ===<br />
<br />
Used when crouching, this defines where the Foot of an Actor is positioned relative to the Actor's SpriteOffset. Note that these coordinates assume the Leg being oriented horizontally as sprites for them are.<br />
<br />
=== StartOffset ===<br />
<br />
Used in the various LimbPath animation definitions, this specifies a target coordinate for the Limb to move to.<br />
<br />
=== HolsterOffset ===<br />
<br />
Not commonly used, if at all. Cortex Command currently does not "holster" any items when unequipped. Appears in both AHuman and ACRocket definitions.<br />
<br />
<br />
=== OpenOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when it opens.<br />
<br />
=== ClosedOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when the door is closed.<br />
<br />
<br />
[[Category:Modding]]</div>Brendanhttps://wiki.datarealms.com/OffsetsOffsets2013-01-25T02:17:14Z<p>Brendan: </p>
<hr />
<div>Offsets define relative positions of many things in Cortex Command. They describe individual points which the game engine maps to individual pixels within [http://en.wikipedia.org/wiki/Sprite_%28computer_graphics%29 sprites] as they move and rotate on screen. Those points are used to position a sprite in relation to another sprite, such as the shoulder joint on an arm sprite and the corresponding shoulder on its "parent" torso sprite. They define where things are, like the [[HDFirearm | gun]] carried by a [[AHuman | soldier]], and also where things are emitted from, like the bullets from that gun.<br />
<br />
You'll need to understand [http://en.wikipedia.org/wiki/Cartesian_coordinate_system Cartesian coordinates] and arithmetic with positive and negative numbers. Offset values are usually [http://en.wikipedia.org/wiki/Integer integers] but Offsets accept [http://en.wikipedia.org/wiki/Floating_point float values] (most often just "_.5"). Though you'll never see half a pixel, Cortex Command's math does. Inaccurate values create inaccuracies in drawing pixels. <br />
<br />
And if you understand [http://www.khanacademy.org/math/linear-algebra/v/linear-algebra--vector-examples vectors], you'll understand positioning Offsets relative to other Offsets, almost always done relative to the SpriteOffset. <br><br />
<br />
== SpriteOffset ==<br />
<br />
If sprites in Cortex Command were paper drawings, cut out and pinned to a cork board, the SpriteOffset would be where the push pin goes though the cutout. If you spin the cutout, it spins around the pin. In physics, things spin around their own [http://en.wikipedia.org/wiki/Center_of_mass center of mass]. The SpriteOffset provides something similar.<br />
<br />
=== Coordinates & Pixels ===<br />
Cortex Command uses pixels, not paper, and pixels have [http://en.wikipedia.org/wiki/Integer integer] coordinates. A coordinate system needs an origin: ''X = 0, Y = 0''. Cortex Command uses the SpriteOffset as the origin for each sprite, and all other Offsets are distances, or [http://www.khanacademy.org/math/linear-algebra/v/linear-algebra--vector-examples vectors], measured from the SpriteOffset measured in pixel lengths on the X and Y axes. <br><br />
If you open a sprite's image file in an image editor (MS Paint, GIMP, Photoshop, etc.), the coordinates of every pixel is a positive integer value, and it's the pixel up in the top left which has the coordinate ''(0,0)''. But this pixel probably shouldn't represent the center of mass. <br><br />
Instead of a push pin positioned over paper, think of positioning over the pixels of the image an invisible, purely mathematical pixel which, by default, is squarely over that top left pixel in the image. This is the SpriteOffset and it can be offset any distance along the X and Y axes, on or off the image, whole or decimal lengths from its natural starting place over (0,0). <br />
<br />
==== Which Axis Is Flipped? ====<br />
There are two ways of looking at how to find coordinates to position Offsets. <br><br />
More mathematically true is the perspective of moving the pin/pixel over the paper/image from the natural origin in the top left. In Cortex Command, one axis has its positive and negative reversed from the Cartesian model; and in this "pin" perspective the X-axis is flipped so right is negative and left is positive. It also means measuring vectors of "child" Offsets back to the SpriteOffset of the parent sprite. <br><br />
The other perspective is more true to how things look in game since Cortex Command moves sprites via their SpriteOffset and visually appear to extending down and to the right from it with ''X = 0'' and ''Y = 0''. This perspective holds the pin/pixel still while moving the paper/image underneath it, typically to the left and up. In this perspective the Y-axis is flipped so up is negative and down is positive. It also means you measure vectors out from the SpriteOffset out to any "child" Offsets. <br><br />
Which perspective you use is irrelevant as the numbers you enter will be the same. '''Just be consistent.'''<br />
<br />
=== Centering the Odds of Evening ===<br />
Typically the SpriteOffset will define a pixel in the very center of the sprite, though official examples such as the [[Dummy#Dummy | Dummy infantry]] position it centered only on the X-axis and low to the hip on the Y-axis. Since sprites are horizontally mirrored, or "HFlipped", to face left, visual popping may occur if the X value of the SpriteOffset is off-center on the X-axis. The Y-axis is more forgiving. <br />
<br />
Positioning the SpriteOffset can be tricky because image sizes are reported as a count of the total number of pixels. A 5x5 image has pixels ranging from (0,0) only up to (4,4). Typically it's easier to find the image size than the coordinate of the bottom right pixel. The middle can be found by subtracting 1 from width or height and dividing by 2. Offsets accept decimal, or [http://en.wikipedia.org/wiki/Floating_point float], values. <br><br />
Even numbered WxH size, to have an equal number of pixels to either side (left & right, above & below) the SpriteOffset, would have ''_.5'' values; or you can just divide width and height in half and it's good enough. Odd numbered widths more consistently map to a specific pixel even as the sprite spins around. <br><br />
<br />
To put the center of mass where, visually, it ought to be ''and'' avoid visual popping, it may be wisest to enlarge the canvas as needed to keep an equal number of pixels horizontally (and perhaps vertically) on either side of the center of mass pixel when setting it as the SpriteOffset.<br />
<br />
<br />
== Offset ==<br />
<br />
Used by Exit hatches on [[ACRocket | ACRockets]] and Terrain material bitmaps. Also used by the Gib entity; this is best left to the Gib Editor included in Cortex Command.<br />
<br />
<br />
== Bitmap Offset ==<br />
<br />
Used for static elements on a map, including TerrainObject set pieces, Bunker Backgrounds and Bunker Bits, as well as the old Brain Vault, Rocket Silo, and Wall. Almost all of their vectors are 0,0 but certain Geology objects and the three old Bunker modules use negative vectors.<br />
<br />
<br />
== EmissionOffset ==<br />
<br />
Used by [[AEmitter]] entities to define which pixel the things it emits are emitted from, in many ways similar to [[Offsets#MuzzleOffset | MuzzleOffset]].<br />
<br />
<br />
== ParentOffset ==<br />
<br />
Used when attaching a "child" sprite, the ParentOffset defines a point relative to the "parent" sprite's SpriteOffset which the child's JointOffset will attach to. For example, it defines a shoulder socket which the arm's shoulder forms a joint with. [[HDFirearm | HDFirearms]] use ParentOffset to define a receiver which the Magazine's JointOffset will snap into. The child is typically a sprite or an [[AEmitter]].<br />
<br />
<br />
== JointOffset ==<br />
<br />
Used when attaching as a "child" to a "parent" sprite, the JointOffset defines a point relative to the child sprite's SpriteOffset which the parent can grab onto and position on itself using it's ParentOffset. Parts of an [[Actors | Actor's]] body are joined to each other with via JointOffset, as are various [[Devices]] like guns and tools. This applies to Actor types like [[ADoor]], [[ACRocket]], and [[ACDropShip]]. Attachable effects and [[AEmitter]] also use this.<br />
<br />
For [[HDFirearm]]s, the JointOffset is where the FGArm (foreground arm) Hand is positioned, typically where the trigger is drawn but it has no effect on firing the [[Weapons | weapon]] or [[Tools | tool]]. If placed too far for an AHuman's Hand to reach, the arm will twitch, trying and failing to reach the JointOffset.<br />
<br />
<br />
== Device-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Devices]]: [[HeldDevice]]s, [[HDFirearm]]s, or [[TDExplosive]]s.<br />
<br />
=== SupportOffset ===<br />
<br />
This defines where the BGArm (background arm) Hand of AHuman is positioned on a Device. Even one-handed devices specify a SupportOffset, though it tends to be close to the JointOffset. Excessive values have the same effect on the BGArm as excessive [[Offsets#JointOffset | JointOffsets]] have on the FGArm.<br />
<br />
=== StanceOffset ===<br />
<br />
Adjustment where the SpriteOffset of a [[HeldDevice]], [[HDFirearm]], or [[ThrownDevice]] lines up with the SpriteOffset of the [[Actors]] carrying it. If a Device is meant to be carried high, slung low, held forward, or tucked back, this is where it should be specified, not SpriteOffset. Note that changing the StanceOffset '''does not change other Offsets'''-- they remain relative to SpriteOffset only. However, excessive values on StanceOffset can put other Offsets beyond reach of an AHuman's Hands.<br />
<br />
=== SharpStanceOffset ===<br />
<br />
Adjustments where a [[HeldDevice]] or [[HDFirearm]] and an Actor's [[Offsets#SpriteOffset | SpriteOffsets]] align, but only when stopping to aim. Most weapons (and even the [[Tools#Diggers | diggers]], for some reason) are carried higher to "look down the sights" though it can be set arbitrarily. Like SupportOffset, all other Offsets on the Device stay relative to the SpriteOffset, thus the "move with" the Device.<br />
<br />
=== MuzzleOffset ===<br />
<br />
Defines the pixel where any Round an [[HDFirearm]] fires are emitted from. Typically this is the forward tip of the barrel, but it can be placed arbitrarily, even outside the sprite's pixel area.<br />
<br />
=== EjectionOffset ===<br />
<br />
The pixel where any Shell will be emitted from the sprite of an HDFirearm. <br />
<br />
<br />
=== StartThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5).<br />
<br />
=== EndThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5) but sometise (12,-5).<br />
<br />
<br />
== Actor-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Actors]]: [[AHuman]]s, [[ACrab]]s, [[ACRocket]]s, [[ACDropShip]]s, or [[ADoor]]s.<br />
<br />
=== IdleOffset ===<br />
<br />
Specified in Arm and Leg definitions to position their Hand and Foot respectively when those limbs are idle. Specifies a point relative to the JointOffset to position the Hand or Foot rather than a specific Parent-Joint attachment. Works in concert with MaxLength to keep Hands and Feet from visually separating from their Arm or Leg. Appears in all Actor definitions except [[ACDropship]] and [[ADoor]] and stationary Brains.<br />
<br />
=== ExtendedOffset ===<br />
<br />
Defines where the Foot of an Actor is positioned relative to the Actor's SpriteOffset when standing. Note that these coordinates assume the Leg being oriented horizontally as sprites for them are.<br />
<br />
=== ContractedOffset ===<br />
<br />
Used when crouching, this defines where the Foot of an Actor is positioned relative to the Actor's SpriteOffset. Note that these coordinates assume the Leg being oriented horizontally as sprites for them are.<br />
<br />
=== StartOffset ===<br />
<br />
Used in the various LimbPath animation definitions, this specifies a target coordinate for the Limb to move to.<br />
<br />
=== HolsterOffset ===<br />
<br />
Not commonly used, if at all. Cortex Command currently does not "holster" any items when unequipped. Appears in both AHuman and ACRocket definitions.<br />
<br />
<br />
=== OpenOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when it opens.<br />
<br />
=== ClosedOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when the door is closed.<br />
<br />
<br />
[[Category:Modding]]</div>Brendanhttps://wiki.datarealms.com/OffsetsOffsets2013-01-25T00:10:11Z<p>Brendan: Factually corrected</p>
<hr />
<div>Offsets define relative positions of many things in Cortex Command. They describe individual points which the game engine maps to individual pixels within [http://en.wikipedia.org/wiki/Sprite_%28computer_graphics%29 sprites] as they move and rotate on screen. Those points are used to position a sprite in relation to another sprite, such as the shoulder joint on an arm sprite and the corresponding shoulder on its "parent" torso sprite. They define where things are, like the [[HDFirearm | gun]] carried by a [[AHuman | soldier]], and also where things are emitted from, like the bullets from that gun.<br />
<br />
You'll need to understand [http://en.wikipedia.org/wiki/Cartesian_coordinate_system Cartesian coordinates] and arithmetic with positive and negative numbers. Offset values are usually [http://en.wikipedia.org/wiki/Integer integers] but Offsets accept [http://en.wikipedia.org/wiki/Floating_point float values] (most often just "_.5"). Though you'll never see half a pixel, Cortex Command's math does. Inaccurate values create inaccuracies in drawing pixels. <br />
<br />
And if you understand [http://www.khanacademy.org/math/linear-algebra/v/linear-algebra--vector-examples vectors], you'll understand positioning Offsets relative to other Offsets, almost always done relative to the SpriteOffset. <br><br />
<br />
== SpriteOffset ==<br />
<br />
If sprites in Cortex Command were paper drawings, cut out and pinned to a cork board, the SpriteOffset would be where the push pin goes though the cutout. If you spin the cutout, it spins around the pin. In physics, things spin around their own [http://en.wikipedia.org/wiki/Center_of_mass center of mass]. The SpriteOffset provides something similar.<br />
<br />
=== Coordinates & Pixels ===<br />
Cortex Command uses pixels, not paper, and pixels have [http://en.wikipedia.org/wiki/Integer integer] coordinates. A coordinate system needs an origin: ''X = 0, Y = 0''. Cortex Command uses the SpriteOffset as the origin for each sprite, and all other Offsets are distances, or [http://www.khanacademy.org/math/linear-algebra/v/linear-algebra--vector-examples vectors], measured from the SpriteOffset measured in pixel lengths on the X and Y axes. <br><br />
If you open a sprite's image file in an image editor (MS Paint, GIMP, Photoshop, etc.), the coordinates of every pixel is a positive integer value, and it's the pixel up in the top left which has the coordinate ''(0,0)''. But this pixel probably shouldn't represent the center of mass. <br><br />
Instead of a push pin positioned over paper, think of positioning over the pixels of the image an invisible, purely mathematical pixel which, by default, is squarely over that top left pixel in the image. This is the SpriteOffset and it can be offset any distance along the X and Y axes, on or off the image, whole or decimal lengths from its natural starting place over (0,0). <br />
<br />
==== Which Axis Is Flipped? ====<br />
There are two ways of looking at how to find coordinates to position Offsets. <br><br />
More mathematically true is the perspective of moving the pin/pixel over the paper/image from the natural origin in the top left. In Cortex Command, one axis has its positive and negative reversed from the Cartesian model; and in this "pin" perspective the X-axis is flipped so right is negative and left is positive. It also means measuring vectors of "child" Offsets back to the SpriteOffset of the parent sprite. <br><br />
The other perspective is more true to how things look in game since Cortex Command moves sprites via their SpriteOffset and visually appear to extending down and to the right from it with ''X = 0'' and ''Y = 0''. This perspective holds the pin/pixel still while moving the paper/image underneath it, typically to the left and up. In this perspective the Y-axis is flipped so up is negative and down is positive. It also means you measure vectors out from the SpriteOffset out to any "child" Offsets. <br><br />
Which perspective you use is irrelevant as the numbers you enter will be the same. '''Just be consistent.'''<br />
<br />
=== Centering the Odds of Evening ===<br />
Typically the SpriteOffset will define a pixel in the very center of the sprite, though official examples such as the [[Dummy#Dummy | Dummy infantry]] position it centered only on the X-axis and low to the hip on the Y-axis. Since sprites are horizontally mirrored, or "HFlipped", to face left, visual popping may occur if the X value of the SpriteOffset is off-center on the X-axis. The Y-axis is more forgiving. <br />
<br />
Positioning the SpriteOffset can be tricky because image sizes are reported as a count of the total number of pixels. A 5x5 image has pixels ranging from (0,0) only up to (4,4). Typically it's easier to find the image size than the coordinate of the bottom right pixel. The middle can be found by subtracting 1 from width or height and dividing by 2. Offsets accept decimal, or [http://en.wikipedia.org/wiki/Floating_point float], values. <br><br />
Even numbered WxH size, to have an equal number of pixels to either side (left & right, above & below) the SpriteOffset, would have ''_.5'' values; or you can just divide width and height in half and it's good enough. Odd numbered widths more consistently map to a specific pixel even as the sprite spins around. <br><br />
<br />
To put the center of mass where, visually, it ought to be ''and'' avoid visual popping, it may be wisest to enlarge the canvas as needed to keep an equal number of pixels horizontally (and perhaps vertically) on either side of the center of mass pixel when setting it as the SpriteOffset.<br />
<br />
<br />
== Offset ==<br />
<br />
Used by Exit hatches on [[ACRocket | ACRockets]] and Terrain material bitmaps. Also used by the Gib entity; this is best left to the Gib Editor included in Cortex Command.<br />
<br />
<br />
== Bitmap Offset ==<br />
<br />
Used for static elements on a map, including TerrainObject set pieces, Bunker Backgrounds and Bunker Bits, as well as the old Brain Vault, Rocket Silo, and Wall. Almost all of their vectors are 0,0 but certain Geology objects and the three old Bunker modules use negative vectors.<br />
<br />
<br />
== EmissionOffset ==<br />
<br />
Used by [[AEmitter]] entities to define which pixel the things it emits are emitted from, in many ways similar to [[Offsets#MuzzleOffset | MuzzleOffset]].<br />
<br />
<br />
== ParentOffset ==<br />
<br />
Used when attaching a "child" sprite, the ParentOffset defines a point relative to the "parent" sprite's SpriteOffset which the child's JointOffset will attach to. For example, it defines a shoulder socket which the arm's shoulder forms a joint with. [[HDFirearm | HDFirearms]] use ParentOffset to define a receiver which the Magazine's JointOffset will snap into. The child is typically a sprite or an [[AEmitter]].<br />
<br />
<br />
== JointOffset ==<br />
<br />
Used when attaching as a "child" to a "parent" sprite, the JointOffset defines a point relative to the child sprite's SpriteOffset which the parent can grab onto and position on itself using it's ParentOffset. Parts of an [[Actors | Actor's]] body are joined to each other with via JointOffset, as are various [[Devices]] like guns and tools. This applies to Actor types like [[ADoor]], [[ACRocket]], and [[ACDropShip]]. Attachable effects and [[AEmitter]] also use this.<br />
<br />
For [[HDFirearm]]s, the JointOffset is where the FGArm (foreground arm) Hand is positioned, typically where the trigger is drawn but it has no effect on firing the [[Weapons | weapon]] or [[Tools | tool]]. If placed too far for an AHuman's Hand to reach, the arm will twitch, trying and failing to reach the JointOffset.<br />
<br />
<br />
== Device-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Devices]]: [[HeldDevice]]s, [[HDFirearm]]s, or [[TDExplosive]]s.<br />
<br />
=== SupportOffset ===<br />
<br />
This defines where the BGArm (background arm) Hand of AHuman is positioned on a Device. Even one-handed devices specify a SupportOffset, though it tends to be close to the JointOffset. Excessive values have the same effect on the BGArm as excessive [[Offsets#JointOffset | JointOffsets]] have on the FGArm.<br />
<br />
=== StanceOffset ===<br />
<br />
Adjustment where the SpriteOffset of a [[HeldDevice]], [[HDFirearm]], or [[ThrownDevice]] lines up with the SpriteOffset of the [[Actors]] carrying it. If a Device is meant to be carried high, slung low, held forward, or tucked back, this is where it should be specified, not SpriteOffset. Note that changing the StanceOffset '''does not change other Offsets'''-- they remain relative to SpriteOffset only. However, excessive values on StanceOffset can put other Offsets beyond reach of an AHuman's Hands.<br />
<br />
=== SharpStanceOffset ===<br />
<br />
Adjustments where a [[HeldDevice]] or [[HDFirearm]] and an Actor's [[Offsets#SpriteOffset | SpriteOffsets]] align, but only when stopping to aim. Most weapons (and even the [[Tools#Diggers | diggers]], for some reason) are carried higher to "look down the sights" though it can be set arbitrarily. Like SupportOffset, all other Offsets on the Device stay relative to the SpriteOffset, thus the "move with" the Device.<br />
<br />
=== MuzzleOffset ===<br />
<br />
Defines the pixel where any Round an [[HDFirearm]] fires are emitted from. Typically this is the forward tip of the barrel, but it can be placed arbitrarily, even outside the sprite's pixel area.<br />
<br />
=== EjectionOffset ===<br />
<br />
The pixel where any Shell will be emitted from the sprite of an HDFirearm. <br />
<br />
<br />
=== StartThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5).<br />
<br />
=== EndThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5) but sometise (12,-5).<br />
<br />
<br />
== Actor-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Actors]]: [[AHuman]]s, [[ACrab]]s, [[ACRocket]]s, [[ACDropShip]]s, or [[ADoor]]s.<br />
<br />
=== IdleOffset ===<br />
<br />
Used to position the Hand on an Arm when its Actor isn't equipped with any Device, and for the Foot on a Leg when standing.<br />
<br />
=== ExtendedOffset ===<br />
<br />
Defines where the Foot of an Actor is positioned relative to the Actor's SpriteOffset when standing. Note that these coordinates assume the Leg being oriented horizontally as sprites for them are.<br />
<br />
=== ContractedOffset ===<br />
<br />
Used when crouching, this defines where the Foot of an Actor is positioned relative to the Actor's SpriteOffset. Note that these coordinates assume the Leg being oriented horizontally as sprites for them are.<br />
<br />
=== StartOffset ===<br />
<br />
Used in the various LimbPath animation definitions, this specifies a target coordinate for the Limb to move to.<br />
<br />
=== HolsterOffset ===<br />
<br />
Not commonly used, if at all. Cortex Command currently does not "holster" any items when unequipped. Appears in both AHuman and ACRocket definitions.<br />
<br />
<br />
=== OpenOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when it opens.<br />
<br />
=== ClosedOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when the door is closed.<br />
<br />
<br />
[[Category:Modding]]</div>Brendanhttps://wiki.datarealms.com/Mu-ilaakMu-ilaak2013-01-23T23:41:52Z<p>Brendan: wording</p>
<hr />
<div><blockquote><big>These alien robots of unknown origin and age are found dwelling on the moon of the planet. Unfortunately they wake up and show hostile intentions.</big></blockquote><br />
<br />
<blockquote>Remnants of Mu-ilaak (story only)<br><br />
<br><br />
Gameplay: These are found on the moon a bit into the story line. They are powerful robots/cyborgs, and can replicate without using facilities aboard a Trade Star. Everyone gangs up on them eventually. Yeah, it's the "united against our common enemy" plot device. In reality FreeTrade wants to get rid of them because they're bad for business.<br><br />
<br><br />
Analogy: Initially superior, bad guys.<br><br />
<br><br />
Colors: Red and silver. [http://androidarts.com/cortexcommand/#remnants]</blockquote><br />
<br />
Cortex Command's story mode was cancelled in favor of completing just the campaign mode after 11.5 years of development. The intention was that the Remnants of the Mu-ilaak would be "the big bad". Your heroic ally would be [[Uzira]], an early human explorer who went into cryogenic sleep after an inconclusive last battle with the Mu-ilaak which left both sides exhausted and stranded on the planet's moon.<br />
<br />
[http://androidarts.com/cortexcommand/Faction_Mu-Ilaak/ Official concept art] show the Mu-ilaak to feature a detachable "mosquito-like" units fans have called a headcrab, as it appears to play a role in taking control of bodies like the "interrogated human" pictured. It also is depicted rebuilding a body which appears to have decayed to bare bones. <br><br />
As speculation, fans have considered Mu-ilaak capable of regenerating their own bodies if the head remains intact, and possibly of converting living or dead bodies of other species into Mu-ilaak drones.<br />
<br />
The Mu-ilaak are depicted with firearms featuring a prominent downward extension from the muzzle, which appears somewhat on the "chin" of the mosquito headcrab and the interrogated human. Mu-ilaak weapons may be plasma based, judging only from the color and shape of projectiles in an official drawing of a Mu-ilaak fighting Uzira's skeleton forces. The weapons appear to be mostly silver-grey with some green accents.</div>Brendanhttps://wiki.datarealms.com/UziraUzira2013-01-23T01:06:33Z<p>Brendan: Wiki links. Tweaks.</p>
<hr />
<div><blockquote><big>Uzira was one of the early explorers. Her team travelled far into unknown space and eventually ran into the ancient and hostile Mu-ilaak. After many long battles both sides were exhausted. The last epic battle took place on the Moon and this is where both sides also got stranded.</big></blockquote><br />
<br />
<blockquote>Uzira (story only)<br><br />
<br><br />
Gameplay: Uzira now rests on the moon in a temple buried under thick sediments of dust. One scenario deals with awakening her from her cryo sleep. She will then provide valuable insight on how to combat the Mu-ilaak. She wears a power armour and is not disembodied. Later on, she commands an army of skeletons (unfinished clones grown by an Alchiral VAT control chip which she snatched). He appears with reinforcements during the last mission. In the end it turns out that she owns stock in Alchiral (now of significant accumulated value).<br><br />
<br><br />
Analogy: Medieval, Undead, Knights<br><br />
<br><br />
Colors: Dark metal and bone. [http://androidarts.com/cortexcommand/#uzira]</blockquote><br />
<br />
Cortex Command's story mode was cancelled in favor of completing just the campaign mode after 11.5 years of development. The intention was that Uzira would be the "big ally" in defeating the awakened remnants of the [[Mu-ilaak]] which had lain dormant since her inconclusive final battle with them long ago, arising as the "big bad" somewhere in the middle of the storyline.<br />
<br />
[http://androidarts.com/cortexcommand/Faction_Knight/knight_lineup.jpg Official concept art] shows Uzira to be a youthful human woman with something of a girly-goth motif to her equipment. In addition to her power-armor sporting skulls, she has an upgraded [[Weapons#Blunderbuss | blunderbuss]]-styled cannon.<br />
<br />
Uzira's main units are [[Free_Trade#Skeleton | skeletons]], including one with armor resembling chainmail. They are armed with "blunder" weaponry which has been included in Free Trade's armory for a long time (along with the skeleton).<br />
<br />
Also pictured is what seems to be a brain robot, judging from the tendency of artist Arne to use many-segmented arms on such units. <br><br />
Uzira was intended to be a unique unit and stated not to be disembodied, so it may be that Uzira also lacks any means of remote controlling other bodies despite being the leader of her faction. Or, this brain robot may be an auxiliary field commander when Uzira is not present. All of this is speculation.<br />
<br />
The symbol emblazoned in bronze/gold on the chest of Uzira's units may be a winged hourglass, a symbol which has been used in mausoleums in medieval times, which would fit with the analogies given for this faction.</div>Brendanhttps://wiki.datarealms.com/Mu-ilaakMu-ilaak2013-01-23T01:01:18Z<p>Brendan: punctuation consistency</p>
<hr />
<div><blockquote><big>These alien robots of unknown origin and age are found dwelling on the moon of the planet. Unfortunately they wake up and show hostile intentions.</big></blockquote><br />
<br />
<blockquote>Remnants of Mu-ilaak (story only)<br><br />
<br><br />
Gameplay: These are found on the moon a bit into the story line. They are powerful robots/cyborgs, and can replicate without using facilities aboard a Trade Star. Everyone gangs up on them eventually. Yeah, it's the "united against our common enemy" plot device. In reality FreeTrade wants to get rid of them because they're bad for business.<br><br />
<br><br />
Analogy: Initially superior, bad guys.<br><br />
<br><br />
Colors: Red and silver. [http://androidarts.com/cortexcommand/#remnants]</blockquote><br />
<br />
Cortex Command's story mode was cancelled in favor of completing just the campaign mode after 11.5 years of development. The intention was that they would be "the big bad". The 'big good' would be [[Uzira]], an early human explorer who went into cryogenic sleep after the last big battle with the Mu-ilaak which left both sides exhausted and stranded on the planet's moon.<br />
<br />
[http://androidarts.com/cortexcommand/Faction_Mu-Ilaak/ Official concept art] show the Mu-ilaak to feature a detachable "mosquito-like" units fans have called a headcrab, as it appears to play a role in taking control of bodies like the "interrogated human" pictured. It also is depicted rebuilding a body which appears to have decayed to bare bones. <br><br />
As speculation, fans have considered Mu-ilaak capable of regenerating their own bodies if the head remains intact, and possibly of converting living or dead bodies of other species into Mu-ilaak drones.<br />
<br />
The Mu-ilaak are depicted with firearms featuring a prominent downward extension from the muzzle, which appears somewhat on the "chin" of the mosquito headcrab and the interrogated human. Mu-ilaak weapons may be plasma based, judging only from the color and shape of projectiles in an official drawing of a Mu-ilaak fighting Uzira's skeleton forces. The weapons appear to be mostly silver-grey with some green accents.</div>Brendanhttps://wiki.datarealms.com/UziraUzira2013-01-23T01:00:40Z<p>Brendan: New page, all the stuff I knew of.</p>
<hr />
<div><blockquote><big>Uzira was one of the early explorers. Her team travelled far into unknown space and eventually ran into the ancient and hostile Mu-ilaak. After many long battles both sides were exhausted. The last epic battle took place on the Moon and this is where both sides also got stranded.</big></blockquote><br />
<br />
<blockquote>Uzira (story only)<br><br />
<br><br />
Gameplay: Uzira now rests on the moon in a temple buried under thick sediments of dust. One scenario deals with awakening her from her cryo sleep. She will then provide valuable insight on how to combat the Mu-ilaak. She wears a power armour and is not disembodied. Later on, she commands an army of skeletons (unfinished clones grown by an Alchiral VAT control chip which she snatched). He appears with reinforcements during the last mission. In the end it turns out that she owns stock in Alchiral (now of significant accumulated value).<br><br />
<br><br />
Analogy: Medieval, Undead, Knights<br><br />
<br><br />
Colors: Dark metal and bone. [http://androidarts.com/cortexcommand/#uzira]</blockquote><br />
<br />
Cortex Command's story mode was cancelled in favor of completing just the campaign mode after 11.5 years of development. The intention was that Uzira would play a crucial role in defeating the awakened remnants of the [[Mu-ilaak]] which had lain dormant since her inconclusive final battle with them long ago, arising as the "big bad" somewhere in the middle of the storyline.<br />
<br />
[http://androidarts.com/cortexcommand/Faction_Knight/knight_lineup.jpg Official concept art] shows Uzira to be a youthful human woman with something of a girly-goth motif to her equipment. In addition to her power-armor sporting skulls, she has an upgraded blunderbuss styled cannon.<br />
<br />
Uzira's main units are skeletons, including one with armor resembling chainmail. They are armed with "blunder" weaponry which has been included in Free Trade's armory for a long time (along with the skeleton). <br><br />
Also pictured is what seems to be a brain robot, judging from the tendency of artist Arne to use many-segmented arms on such units. Uzira was intended to be a unique unit and stated not to be disembodied, so it may be that Uzira also lacks any means of remote controlling other bodies despite being the leader of her faction. Or, this brain robot may be an auxiliary field commander when Uzira is not present. All of this is speculation.<br />
<br />
The symbol emblazoned in bronze/gold on the chest of Uzira's units may be a winged hourglass, a symbol which has been used in mausoleums in medieval times, which would fit with the analogies given for this faction.</div>Brendanhttps://wiki.datarealms.com/Mu-ilaakMu-ilaak2013-01-23T00:05:20Z<p>Brendan: New page, all the stuff I knew of.</p>
<hr />
<div><blockquote><big>"These alien robots of unknown origin and age are found dwelling on the moon of the planet. Unfortunately they wake up and show hostile intentions.</big></blockquote><br />
<br />
<blockquote>Remnants of Mu-ilaak (story only)<br><br />
<br><br />
Gameplay: These are found on the moon a bit into the story line. They are powerful robots/cyborgs, and can replicate without using facilities aboard a Trade Star. Everyone gangs up on them eventually. Yeah, it's the "united against our common enemy" plot device. In reality FreeTrade wants to get rid of them because they're bad for business.<br><br />
<br><br />
Analogy: Initially superior, bad guys.<br><br />
<br><br />
Colors: Red and silver." [http://androidarts.com/cortexcommand/#remnants]</blockquote><br />
<br />
Cortex Command's story mode was cancelled in favor of completing just the campaign mode after 11.5 years of development. The intention was that they would be "the big bad". The 'big good' would be [[Uzira]], an early human explorer who went into cryogenic sleep after the last big battle with the Mu-ilaak which left both sides exhausted and stranded on the planet's moon.<br />
<br />
[http://androidarts.com/cortexcommand/Faction_Mu-Ilaak/ Official concept art] show the Mu-ilaak to feature a detachable "mosquito-like" units fans have called a headcrab, as it appears to play a role in taking control of bodies like the "interrogated human" pictured. It also is depicted rebuilding a body which appears to have decayed to bare bones. <br><br />
As speculation, fans have considered Mu-ilaak capable of regenerating their own bodies if the head remains intact, and possibly of converting living or dead bodies of other species into Mu-ilaak drones.<br />
<br />
The Mu-ilaak are depicted with firearms featuring a prominent downward extension from the muzzle, which appears somewhat on the "chin" of the mosquito headcrab and the interrogated human. Mu-ilaak weapons may be plasma based, judging only from the color and shape of projectiles in an official drawing of a Mu-ilaak fighting Uzira's skeleton forces. The weapons appear to be mostly silver-grey with some green accents.</div>Brendanhttps://wiki.datarealms.com/Cortex_CommandCortex Command2013-01-22T23:36:42Z<p>Brendan: Update to 1.0 release state</p>
<hr />
<div>{{TOCleft}}<br />
<div align="center">[[Image:CCWebTile.png]]</div><br />
<br><br />
<br><br />
<br />
<br />
<br />
<br><br />
<br />
== About ==<br />
<br />
"In Cortex Command, you play as a prospector and explorer in a time where complete cybernetics and whole-body amputations are common practice. Your severed brain is able to control many different types of bodies remotely from its underground bunker: clones, robots, spaceships, defensive turrets, and so on.<br />
<br />
A typical scenario starts with a building phase where you get to construct your own bunker complex from scratch. Then you need to mine precious gold from the deformable pixel terrain in order to buy more and better ships, soldiers, weapons, digging tools, and deployable defenses. Use these assets to defend your disembodied brain and destroy or bankrupt your opponent!<br />
<br />
Control your team of remote bodies either directly or let the friendly AI do your bidding through real-time strategy elements built into the game. Play with up to four players in split screen -- 2 vs. 2 players, or all four cooperatively against the computer. Eventually, you can play the campaign missions together with friends..."<br />
<br />
<br />
Cortex Command is the flagship product of [http://www.datarealms.com/ Data Realms LLC], reaching 1.0 release in September 2012 after over eleven years in development. <br><br />
It is proprietary software made by a small indie game company in collaboration with its fan community.<br />
<br />
== Story ==<br />
<br />
Earth was over. <br />
<br />
Once peaceful, our world was awash in bloodshed, wracked by wars backed by holy men. It was humanity's darkest hour, and the boldest decisions were simply all we had left. <br />
<br />
Forged in the rush of war, a curious symbiosis between man and machine formed. Our numbers bleeding away, technology enabled the survivors to control robots and clones from safety. And in the end, we found our bodies an obsolete constraint, and cast them off. Brain and mind interfaced with machines, we became more spirit than flesh-- one person living through many bodies. <br />
<br />
And in this new form we attained escape from the corpse of our world. Interstellar rocket ships for the decades-long flights to reach new worlds became common once life support for entire bodies was unnecessary. <br />
<br />
Fleeing into the dark unknown, humanity discovered it was not alone, but also not important. Humanity struggled for acceptance in this alien community, eventually forging the Orion Spur Amalgam. Interstellar trade flourished, and with it came rapid expansion. As the era of faster-than-light dawned, humanity could live again in peace and prosperity. <br />
<br />
But human nature wasn't cast off as easily. For every city and space station compounded the ever-growing hunger for resources. Worlds were stripped in civilized sectors where law ensured conquest by the highest bidder. So all eyes turned outward, to star systems where no law existed but what you could enforce. <br />
<br />
As the gold rush brings commanders from several rival groups to one such world beyond the far eastern fringes of the OSA, all prepare to assume... '''Cortex Command'''.<br />
<br />
== [[Tech | Techs]] ==<br />
''Note: Techs replaced Factions in Build 27.''<br />
Techs are distinct groups with their own sets of units, [[Weapons | weapons]], [[Tools | tools]], [[Bombs | bombs]], and even vehicles, as well as access to Free Trade products. The player acts as a kind of local commander or franchisee of one of the Techs competing with the others. Cost to buy from Techs other than your own are four times the in-Tech price.<br />
<br />
=== ''[[Free Trade]]'' ===<br />
<br />
''This is the "default tech". Items sold by Free Trade will be in the top-level of the Buy Menu not under a Tech heading. You cannot campaign as Free Trade, nor are they part of skirmishes.''<br />
<br />
Free Trade is a super corporation which owns and operates TradeStars, including TradeStar Midas which transports everything you purchase in the Buy Menu. They also sell a few units and [[Weapons | weapons]] of their own as well as most all the [[Tools | tools]] available.<br />
<br />
=== [[Coalition]] ===<br />
<br />
A militarized organization, the Coalition produce a large array of units and weaponry to choose from. They are versatile and powerful, making them a strong ally or a dangerous foe.<br />
<br />
=== [[Dummy]] ===<br />
<br />
These robots were originally designed as test subjects for weapons, vehicle safety measures, and other lethal experiments, but an AI controller became sentient and broke off from its manufacturers, starting a new line of robots and weapons to defend itself.<br />
<br />
=== [[Ronin]] ===<br />
<br />
Rag-tag parties of bandits who prey on weak and unsuspecting explorers. Their soldiers are unarmored and weapons primitive, but they manage to get the job done.<br />
<br />
=== [[Browncoat]] ===<br />
<br />
A strong mercenary group who are fearsome when confronted up-close. What they lack in range is made up for in durability, allowing them to close distances while soaking bullets.<br />
<br />
=== [[Imperatus]] ===<br />
<br />
The Imperatus rely on pure brute force and the reliability of their sturdy and easy to produce armored units. They use simple low rate of fire guns and cannons which tirelessly deals out good damage.<br />
<br />
=== [[Techion]] ===<br />
<br />
An elite faction formed by a few high-tech corporations. They focus on expensive units and exotic weaponry, and have the distinction of being selected by [[Free Trade]] to occassionally provide security for TradeStar activities.<br />
<br />
== Factions ==<br />
<br />
Some of the factions that are featured in the game. Some of these have yet to be implemented and there are more to be revealed. Some are only involved with services or storyline fluff, thus may not have soldiers or even equipment for sale.<br />
<br />
<br />
'''[[Wildlife]]'''<br />
<br />
The critters that inhabit the gold-rich planet you're on, primarily crabs. Unfortunately for them, your fighting and mining is killing them and is laying waste to their planet. <br><br />
Following a mass extinction event, crabs comprise almost all animal life on the planet, while a bulbous kind of plant is the dominant vegetation.<br />
<br />
<br />
'''[[Free_Trade#Culled_Clones | Undead]]'''<br />
<br />
Became "Culled Clone" units sold by [[Free Trade]] as of Build 27. They formerly were a faction first encountered in a "Zombie Cave" mission also featuring a [[Ronin]] hit squad.<br />
<br />
<br />
'''Green Dummies'''<br />
<br />
Largely identical to the familiar [[Dummy | orange Dummies]], these cheap general purpose labor robots were meant to be the player's starting units in the Tutorial Mission. They are what the Dummy forces were before their [[Dummy#Dummy_Controller | AI control unit]] became a sentient computer. It's unclear whether Green Dummies would still be for sale by [[TradeStar]].<br />
<br />
<br />
'''[[Mu-ilaak | Remnants of Mu-ilaak]]'''<br />
<br />
Alien robots of unknown age and origin, they were intended as the big-bad of Cortex Command's planned story mode. Dormant on the planet's moon, stranded after a battle in the distant past with human explorer Uzira, the Mu-ilaak awaken to wreak havoc using an apparent ability to convert organic (and possibly robotic) enemies into cyborg drones.<br />
<br />
<br />
'''[[Uzira]]'''<br />
<br />
An early human explorer far into unknown space, Uzira was intended as the heroic ally of the planned story mode. Uzira's team ran into the ancient and hostile [[Mu-ilaak]]. Their battles left both sides exhausted and stranded on this planet's moon. Her troops are skeletons, sometimes with elaborate armor, and armed with blunderbuss-shaped weapons.<br />
<br />
<br />
'''[[Alchiral]]'''<br />
<br />
Alchiral is one of the largest manufacturers of organic human bodies. Most or all TradeStars in sectors with human populations carry a compliment of Alchiral VAT arrays. The technology is under strict control by Alchiral's overseers to ensure that their monopoly is maintained.<br />
<br />
<br />
'''Aliens'''<br />
<br />
Aliens, sure; you really can't tell what species the brain is can you? You might be a Zxolophlox controlling those human bodies, because human bodies makes nice organic meat puppets. The opening cinematic briefly shows various alien lifeforms that may be integrated into the game.<br />
<br />
== [[Modding]] ==<br />
Cortex Command uses a simple variable-base object designing system to allow modders to create their own entities, along with lua for more complex features. Modding is easy to learn for Cortex Command, and currently there are many mods being released every day. Released mods may range from serious and realistic to fun and silly.<br />
<br />
<br />
To find and download mods, you can go to [http://www.datarealms.com/forum/ Mod Releases].<br><br />
For help installing mods, you can go to [http://forums.datarealms.com/viewtopic.php?f=61&t=10652 How to install mods].<br />
<br />
== History ==<br />
The first recorded development of Cortex Command started on the 22nd February 2001, and was originally called D.I.R.T, by Daniel Tabar (a.k.a. DaTa, or Data), and a working alpha was released publicly some years later. Since then "Cortex Command" has gone through numerous changes and updates.<br />
<br />
As the game carried on DaTa realized that he wasn't exactly the best artist and sought the help of [http://www.itchstudios.com/psg/ Promster] (a.k.a. Prometheus). Promster's graphical changes were implemented on the 27th of July, 2004 and gave Cortex Command the graphical style that it is now known for.<br />
<br />
In 2008, he contracted several members of the community to do work for the game. These contributors included '''capnbubs''', '''TheLastBanana''' and '''numgun'''. Following a huge amount of community support, '''CaveCricket48''' was included onto the team, shortly followed by '''Lizardheim''', and '''Abdul Alhazred'''.<br />
<br />
The time lapse between public releases has occasionally been extensive, and it was for this reason, amongst other things, that the developer '''numgun''' left the team, and indeed the community. There was a gap of two years between builds 23 and 24, which was due to a lack of dedication from Data himself, and between those builds it was felt very much by the community that not enough had been accomplished. Following the release of build 24, Data improved his relations with the fans, and gave regular updates via his [http://twitter.com/#!/DataRealms/ Twitter Updates]. Very quickly build 25 was released, which was, by all accounts, a rousing success.<br />
<br />
Build 27, the last public testing release before the full version of the game, incorporated a nearly fully working campaign, and de-activated the ability to injure team-mates, amongst other modding tools.<br />
<br />
Release 1.0 was made in September 2012. It implemented all six Techs ([[Coalition]], [[Dummy|Dummies]], [[Ronin]], [[Browncoat|Browncoats]], [[Imperatus]], and [[Techion]]) in a working Campaign mode. Story mode was scraped with remnants of early stages as Mission Activities.<br />
<br />
The project has been in development for eleven and a half years. It has been submitted to the [http://en.wikipedia.org/wiki/Independent_Games_Festival Independent Games Festival] four times, and the forth time it won two awards; one for technical excellence and the other an audience award.<br />
Cortex Command has a feature on the [http://www.greatgamesexperiment.com/game/cortexcommand/?utm_source=gge&utm_medium=badge_user Great Games Experiment], and was featured in [http://www.playmagazine.com/ Play] magazine. It was also one of the prestigious [http://www.humblebundle.com Humble Indie Bundles], where it was widely well received.</div>Brendanhttps://wiki.datarealms.com/Cortex_CommandCortex Command2013-01-22T23:30:53Z<p>Brendan: Moved "Free Trade" up to mirror placement in the Buy menu</p>
<hr />
<div>{{TOCleft}}<br />
<div align="center">[[Image:CCWebTile.png]]</div><br />
<br><br />
<br><br />
<br />
<br />
<br />
<br><br />
<br />
== About ==<br />
Cortex Command is the primary project of Data Realms LLC. The game is still in development.<br />
<br />
"In Cortex Command, you play as a prospector and explorer in a time where complete cybernetics and whole-body amputations are common practice. Your severed brain is able to control many different types of bodies remotely from its underground bunker: clones, robots, spaceships, defensive turrets, and so on.<br />
<br />
A typical scenario starts with a building phase where you get to construct your own bunker complex from scratch. Then you need to mine precious gold from the deformable pixel terrain in order to buy more and better ships, soldiers, weapons, digging tools, and deployable defenses. Use these assets to defend your disembodied brain and destroy or bankrupt your opponent!<br />
<br />
Control your team of remote bodies either directly or let the friendly AI do your bidding through real-time strategy elements built into the game. Play with up to four players in split screen -- 2 vs. 2 players, or all four cooperatively against the computer. Eventually, you can play the campaign missions together with friends..."<br />
<br />
<br />
== Story ==<br />
<br />
Earth was over. <br />
<br />
Once peaceful, our world was awash in bloodshed, wracked by wars backed by holy men. It was humanity's darkest hour, and the boldest decisions were simply all we had left. <br />
<br />
Forged in the rush of war, a curious symbiosis between man and machine formed. Our numbers bleeding away, technology enabled the survivors to control robots and clones from safety. And in the end, we found our bodies an obsolete constraint, and cast them off. Brain and mind interfaced with machines, we became more spirit than flesh-- one person living through many bodies. <br />
<br />
And in this new form we attained escape from the corpse of our world. Interstellar rocket ships for the decades-long flights to reach new worlds became common once life support for entire bodies was unnecessary. <br />
<br />
Fleeing into the dark unknown, humanity discovered it was not alone, but also not important. Humanity struggled for acceptance in this alien community, eventually forging the Orion Spur Amalgam. Interstellar trade flourished, and with it came rapid expansion. As the era of faster-than-light dawned, humanity could live again in peace and prosperity. <br />
<br />
But human nature wasn't cast off as easily. For every city and space station compounded the ever-growing hunger for resources. Worlds were stripped in civilized sectors where law ensured conquest by the highest bidder. So all eyes turned outward, to star systems where no law existed but what you could enforce. <br />
<br />
As the gold rush brings commanders from several rival groups to one such world beyond the far eastern fringes of the OSA, all prepare to assume... '''Cortex Command'''.<br />
<br />
== [[Tech | Techs]] ==<br />
''Note: Techs replaced Factions in Build 27.''<br />
Techs are distinct groups with their own sets of units, [[Weapons | weapons]], [[Tools | tools]], [[Bombs | bombs]], and even vehicles, as well as access to Free Trade products. The player acts as a kind of local commander or franchisee of one of the Techs competing with the others. Cost to buy from Techs other than your own are four times the in-Tech price.<br />
<br />
=== ''[[Free Trade]]'' ===<br />
<br />
''This is the "default tech". Items sold by Free Trade will be in the top-level of the Buy Menu not under a Tech heading. You cannot campaign as Free Trade, nor are they part of skirmishes.''<br />
<br />
Free Trade is a super corporation which owns and operates TradeStars, including TradeStar Midas which transports everything you purchase in the Buy Menu. They also sell a few units and [[Weapons | weapons]] of their own as well as most all the [[Tools | tools]] available.<br />
<br />
=== [[Coalition]] ===<br />
<br />
A militarized organization, the Coalition produce a large array of units and weaponry to choose from. They are versatile and powerful, making them a strong ally or a dangerous foe.<br />
<br />
=== [[Dummy]] ===<br />
<br />
These robots were originally designed as test subjects for weapons, vehicle safety measures, and other lethal experiments, but an AI controller became sentient and broke off from its manufacturers, starting a new line of robots and weapons to defend itself.<br />
<br />
=== [[Ronin]] ===<br />
<br />
Rag-tag parties of bandits who prey on weak and unsuspecting explorers. Their soldiers are unarmored and weapons primitive, but they manage to get the job done.<br />
<br />
=== [[Browncoat]] ===<br />
<br />
A strong mercenary group who are fearsome when confronted up-close. What they lack in range is made up for in durability, allowing them to close distances while soaking bullets.<br />
<br />
=== [[Imperatus]] ===<br />
<br />
The Imperatus rely on pure brute force and the reliability of their sturdy and easy to produce armored units. They use simple low rate of fire guns and cannons which tirelessly deals out good damage.<br />
<br />
=== [[Techion]] ===<br />
<br />
An elite faction formed by a few high-tech corporations. They focus on expensive units and exotic weaponry, and have the distinction of being selected by [[Free Trade]] to occassionally provide security for TradeStar activities.<br />
<br />
== Factions ==<br />
<br />
Some of the factions that are featured in the game. Some of these have yet to be implemented and there are more to be revealed. Some are only involved with services or storyline fluff, thus may not have soldiers or even equipment for sale.<br />
<br />
<br />
'''[[Wildlife]]'''<br />
<br />
The critters that inhabit the gold-rich planet you're on, primarily crabs. Unfortunately for them, your fighting and mining is killing them and is laying waste to their planet. <br><br />
Following a mass extinction event, crabs comprise almost all animal life on the planet, while a bulbous kind of plant is the dominant vegetation.<br />
<br />
<br />
'''[[Free_Trade#Culled_Clones | Undead]]'''<br />
<br />
Became "Culled Clone" units sold by [[Free Trade]] as of Build 27. They formerly were a faction first encountered in a "Zombie Cave" mission also featuring a [[Ronin]] hit squad.<br />
<br />
<br />
'''Green Dummies'''<br />
<br />
Largely identical to the familiar [[Dummy | orange Dummies]], these cheap general purpose labor robots were meant to be the player's starting units in the Tutorial Mission. They are what the Dummy forces were before their [[Dummy#Dummy_Controller | AI control unit]] became a sentient computer. It's unclear whether Green Dummies would still be for sale by [[TradeStar]].<br />
<br />
<br />
'''[[Mu-ilaak | Remnants of Mu-ilaak]]'''<br />
<br />
Alien robots of unknown age and origin, they were intended as the big-bad of Cortex Command's planned story mode. Dormant on the planet's moon, stranded after a battle in the distant past with human explorer Uzira, the Mu-ilaak awaken to wreak havoc using an apparent ability to convert organic (and possibly robotic) enemies into cyborg drones.<br />
<br />
<br />
'''[[Uzira]]'''<br />
<br />
An early human explorer far into unknown space, Uzira was intended as the heroic ally of the planned story mode. Uzira's team ran into the ancient and hostile [[Mu-ilaak]]. Their battles left both sides exhausted and stranded on this planet's moon. Her troops are skeletons, sometimes with elaborate armor, and armed with blunderbuss-shaped weapons.<br />
<br />
<br />
'''[[Alchiral]]'''<br />
<br />
Alchiral is one of the largest manufacturers of organic human bodies. Most or all TradeStars in sectors with human populations carry a compliment of Alchiral VAT arrays. The technology is under strict control by Alchiral's overseers to ensure that their monopoly is maintained.<br />
<br />
<br />
'''Aliens'''<br />
<br />
Aliens, sure; you really can't tell what species the brain is can you? You might be a Zxolophlox controlling those human bodies, because human bodies makes nice organic meat puppets. The opening cinematic briefly shows various alien lifeforms that may be integrated into the game.<br />
<br />
== [[Modding]] ==<br />
Cortex Command uses a simple variable-base object designing system to allow modders to create their own entities, along with lua for more complex features. Modding is easy to learn for Cortex Command, and currently there are many mods being released every day. Released mods may range from serious and realistic to fun and silly.<br />
<br />
<br />
To find and download mods, you can go to [http://www.datarealms.com/forum/ Mod Releases].<br><br />
For help installing mods, you can go to [http://forums.datarealms.com/viewtopic.php?f=61&t=10652 How to install mods].<br />
<br />
== History ==<br />
The first recorded development of Cortex Command started on the 22nd February 2001, and was originally called D.I.R.T, by Daniel Tabar (a.k.a. DaTa, or Data), and a working alpha was released publicly some years later. Since then "Cortex Command" has gone through numerous changes and updates.<br />
<br />
As the game carried on DaTa realized that he wasn't exactly the best artist and sought the help of [http://www.itchstudios.com/psg/ Promster] (a.k.a. Prometheus). Promster's graphical changes were implemented on the 27th of July, 2004 and gave Cortex Command the graphical style that it is now known for.<br />
<br />
In 2008, he contracted several members of the community to do work for the game. These contributors included '''capnbubs''', '''TheLastBanana''' and '''numgun'''. Following a huge amount of community support, '''CaveCricket48''' was included onto the team, shortly followed by '''Lizardheim''', and '''Abdul Alhazred'''.<br />
<br />
The time lapse between public releases has occasionally been extensive, and it was for this reason, amongst other things, that the developer '''numgun''' left the team, and indeed the community. There was a gap of two years between builds 23 and 24, which was due to a lack of dedication from Data himself, and between those builds it was felt very much by the community that not enough had been accomplished. Following the release of build 24, Data improved his relations with the fans, and gave regular updates via his [http://twitter.com/#!/DataRealms/ Twitter Updates]. Very quickly build 25 was released, which was, by all accounts, a rousing success.<br />
<br />
Build 27, the last public testing release before the full version of the game, incorporated a nearly fully working campaign, and de-activated the ability to injure team-mates, amongst other modding tools.<br />
<br />
Release 1.0 was made in September 2012. It implemented all six Techs ([[Coalition]], [[Dummy|Dummies]], [[Ronin]], [[Browncoat|Browncoats]], [[Imperatus]], and [[Techion]]) in a working Campaign mode. Story mode was scraped with remnants of early stages as Mission Activities.<br />
<br />
The project has been in development for eleven and a half years. It has been submitted to the [http://en.wikipedia.org/wiki/Independent_Games_Festival Independent Games Festival] four times, and the forth time it won two awards; one for technical excellence and the other an audience award.<br />
Cortex Command has a feature on the [http://www.greatgamesexperiment.com/game/cortexcommand/?utm_source=gge&utm_medium=badge_user Great Games Experiment], and was featured in [http://www.playmagazine.com/ Play] magazine. It was also one of the prestigious [http://www.humblebundle.com Humble Indie Bundles], where it was widely well received.</div>Brendanhttps://wiki.datarealms.com/Cortex_CommandCortex Command2013-01-22T23:28:57Z<p>Brendan: Update to 1.0 release state</p>
<hr />
<div>{{TOCleft}}<br />
<div align="center">[[Image:CCWebTile.png]]</div><br />
<br><br />
<br><br />
<br />
<br />
<br />
<br><br />
<br />
== About ==<br />
Cortex Command is the primary project of Data Realms LLC. The game is still in development.<br />
<br />
"In Cortex Command, you play as a prospector and explorer in a time where complete cybernetics and whole-body amputations are common practice. Your severed brain is able to control many different types of bodies remotely from its underground bunker: clones, robots, spaceships, defensive turrets, and so on.<br />
<br />
A typical scenario starts with a building phase where you get to construct your own bunker complex from scratch. Then you need to mine precious gold from the deformable pixel terrain in order to buy more and better ships, soldiers, weapons, digging tools, and deployable defenses. Use these assets to defend your disembodied brain and destroy or bankrupt your opponent!<br />
<br />
Control your team of remote bodies either directly or let the friendly AI do your bidding through real-time strategy elements built into the game. Play with up to four players in split screen -- 2 vs. 2 players, or all four cooperatively against the computer. Eventually, you can play the campaign missions together with friends..."<br />
<br />
<br />
== Story ==<br />
<br />
Earth was over. <br />
<br />
Once peaceful, our world was awash in bloodshed, wracked by wars backed by holy men. It was humanity's darkest hour, and the boldest decisions were simply all we had left. <br />
<br />
Forged in the rush of war, a curious symbiosis between man and machine formed. Our numbers bleeding away, technology enabled the survivors to control robots and clones from safety. And in the end, we found our bodies an obsolete constraint, and cast them off. Brain and mind interfaced with machines, we became more spirit than flesh-- one person living through many bodies. <br />
<br />
And in this new form we attained escape from the corpse of our world. Interstellar rocket ships for the decades-long flights to reach new worlds became common once life support for entire bodies was unnecessary. <br />
<br />
Fleeing into the dark unknown, humanity discovered it was not alone, but also not important. Humanity struggled for acceptance in this alien community, eventually forging the Orion Spur Amalgam. Interstellar trade flourished, and with it came rapid expansion. As the era of faster-than-light dawned, humanity could live again in peace and prosperity. <br />
<br />
But human nature wasn't cast off as easily. For every city and space station compounded the ever-growing hunger for resources. Worlds were stripped in civilized sectors where law ensured conquest by the highest bidder. So all eyes turned outward, to star systems where no law existed but what you could enforce. <br />
<br />
As the gold rush brings commanders from several rival groups to one such world beyond the far eastern fringes of the OSA, all prepare to assume... '''Cortex Command'''.<br />
<br />
== [[Tech | Techs]] ==<br />
''Note: Techs replaced Factions in Build 27.''<br />
Techs are distinct groups with their own sets of units, [[Weapons | weapons]], [[Tools | tools]], [[Bombs | bombs]], and even vehicles, as well as access to Free Trade products. The player acts as a kind of local commander or franchisee of one of the Techs competing with the others. Cost to buy from Techs other than your own are four times the in-Tech price.<br />
<br />
=== [[Coalition]] ===<br />
<br />
A militarized organization, the Coalition produce a large array of units and weaponry to choose from. They are versatile and powerful, making them a strong ally or a dangerous foe.<br />
<br />
=== [[Dummy]] ===<br />
<br />
These robots were originally designed as test subjects for weapons, vehicle safety measures, and other lethal experiments, but an AI controller became sentient and broke off from its manufacturers, starting a new line of robots and weapons to defend itself.<br />
<br />
=== [[Ronin]] ===<br />
<br />
Rag-tag parties of bandits who prey on weak and unsuspecting explorers. Their soldiers are unarmored and weapons primitive, but they manage to get the job done.<br />
<br />
=== [[Browncoat]] ===<br />
<br />
A strong mercenary group who are fearsome when confronted up-close. What they lack in range is made up for in durability, allowing them to close distances while soaking bullets.<br />
<br />
=== [[Imperatus]] ===<br />
<br />
The Imperatus rely on pure brute force and the reliability of their sturdy and easy to produce armored units. They use simple low rate of fire guns and cannons which tirelessly deals out good damage.<br />
<br />
=== [[Techion]] ===<br />
<br />
An elite faction formed by a few high-tech corporations. They focus on expensive units and exotic weaponry, and have the distinction of being selected by [[Free Trade]] to occassionally provide security for TradeStar activities. <br />
<br />
=== ''[[Free Trade]]'' ===<br />
<br />
''This is the "default tech". Items sold by Free Trade will be in the top-level of the Buy Menu not under a Tech heading. You cannot campaign as Free Trade, nor are they part of skirmishes.''<br />
<br />
Free Trade is a super corporation which owns and operates TradeStars, including TradeStar Midas which transports everything you purchase in the Buy Menu. They also sell a few units and [[Weapons | weapons]] of their own as well as most all the [[Tools | tools]] available.<br />
<br />
== Factions ==<br />
<br />
Some of the factions that are featured in the game. Some of these have yet to be implemented and there are more to be revealed. Some are only involved with services or storyline fluff, thus may not have soldiers or even equipment for sale.<br />
<br />
<br />
'''[[Wildlife]]'''<br />
<br />
The critters that inhabit the gold-rich planet you're on, primarily crabs. Unfortunately for them, your fighting and mining is killing them and is laying waste to their planet. <br><br />
Following a mass extinction event, crabs comprise almost all animal life on the planet, while a bulbous kind of plant is the dominant vegetation.<br />
<br />
<br />
'''[[Free_Trade#Culled_Clones | Undead]]'''<br />
<br />
Became "Culled Clone" units sold by [[Free Trade]] as of Build 27. They formerly were a faction first encountered in a "Zombie Cave" mission also featuring a [[Ronin]] hit squad.<br />
<br />
<br />
'''Green Dummies'''<br />
<br />
Largely identical to the familiar [[Dummy | orange Dummies]], these cheap general purpose labor robots were meant to be the player's starting units in the Tutorial Mission. They are what the Dummy forces were before their [[Dummy#Dummy_Controller | AI control unit]] became a sentient computer. It's unclear whether Green Dummies would still be for sale by [[TradeStar]].<br />
<br />
<br />
'''[[Mu-ilaak | Remnants of Mu-ilaak]]'''<br />
<br />
Alien robots of unknown age and origin, they were intended as the big-bad of Cortex Command's planned story mode. Dormant on the planet's moon, stranded after a battle in the distant past with human explorer Uzira, the Mu-ilaak awaken to wreak havoc using an apparent ability to convert organic (and possibly robotic) enemies into cyborg drones.<br />
<br />
<br />
'''[[Uzira]]'''<br />
<br />
An early human explorer far into unknown space, Uzira was intended as the heroic ally of the planned story mode. Uzira's team ran into the ancient and hostile [[Mu-ilaak]]. Their battles left both sides exhausted and stranded on this planet's moon. Her troops are skeletons, sometimes with elaborate armor, and armed with blunderbuss-shaped weapons.<br />
<br />
<br />
'''[[Alchiral]]'''<br />
<br />
Alchiral is one of the largest manufacturers of organic human bodies. Most or all TradeStars in sectors with human populations carry a compliment of Alchiral VAT arrays. The technology is under strict control by Alchiral's overseers to ensure that their monopoly is maintained.<br />
<br />
<br />
'''Aliens'''<br />
<br />
Aliens, sure; you really can't tell what species the brain is can you? You might be a Zxolophlox controlling those human bodies, because human bodies makes nice organic meat puppets. The opening cinematic briefly shows various alien lifeforms that may be integrated into the game.<br />
<br />
== [[Modding]] ==<br />
Cortex Command uses a simple variable-base object designing system to allow modders to create their own entities, along with lua for more complex features. Modding is easy to learn for Cortex Command, and currently there are many mods being released every day. Released mods may range from serious and realistic to fun and silly.<br />
<br />
<br />
To find and download mods, you can go to [http://www.datarealms.com/forum/ Mod Releases].<br><br />
For help installing mods, you can go to [http://forums.datarealms.com/viewtopic.php?f=61&t=10652 How to install mods].<br />
<br />
== History ==<br />
The first recorded development of Cortex Command started on the 22nd February 2001, and was originally called D.I.R.T, by Daniel Tabar (a.k.a. DaTa, or Data), and a working alpha was released publicly some years later. Since then "Cortex Command" has gone through numerous changes and updates.<br />
<br />
As the game carried on DaTa realized that he wasn't exactly the best artist and sought the help of [http://www.itchstudios.com/psg/ Promster] (a.k.a. Prometheus). Promster's graphical changes were implemented on the 27th of July, 2004 and gave Cortex Command the graphical style that it is now known for.<br />
<br />
In 2008, he contracted several members of the community to do work for the game. These contributors included '''capnbubs''', '''TheLastBanana''' and '''numgun'''. Following a huge amount of community support, '''CaveCricket48''' was included onto the team, shortly followed by '''Lizardheim''', and '''Abdul Alhazred'''.<br />
<br />
The time lapse between public releases has occasionally been extensive, and it was for this reason, amongst other things, that the developer '''numgun''' left the team, and indeed the community. There was a gap of two years between builds 23 and 24, which was due to a lack of dedication from Data himself, and between those builds it was felt very much by the community that not enough had been accomplished. Following the release of build 24, Data improved his relations with the fans, and gave regular updates via his [http://twitter.com/#!/DataRealms/ Twitter Updates]. Very quickly build 25 was released, which was, by all accounts, a rousing success.<br />
<br />
Build 27, the last public testing release before the full version of the game, incorporated a nearly fully working campaign, and de-activated the ability to injure team-mates, amongst other modding tools.<br />
<br />
Release 1.0 was made in September 2012. It implemented all six Techs ([[Coalition]], [[Dummy|Dummies]], [[Ronin]], [[Browncoat|Browncoats]], [[Imperatus]], and [[Techion]]) in a working Campaign mode. Story mode was scraped with remnants of early stages as Mission Activities.<br />
<br />
The project has been in development for eleven and a half years. It has been submitted to the [http://en.wikipedia.org/wiki/Independent_Games_Festival Independent Games Festival] four times, and the forth time it won two awards; one for technical excellence and the other an audience award.<br />
Cortex Command has a feature on the [http://www.greatgamesexperiment.com/game/cortexcommand/?utm_source=gge&utm_medium=badge_user Great Games Experiment], and was featured in [http://www.playmagazine.com/ Play] magazine. It was also one of the prestigious [http://www.humblebundle.com Humble Indie Bundles], where it was widely well received.</div>Brendanhttps://wiki.datarealms.com/Cortex_CommandCortex Command2013-01-22T23:07:18Z<p>Brendan: Update to 1.0 release state</p>
<hr />
<div>{{TOCleft}}<br />
<div align="center">[[Image:CCWebTile.png]]</div><br />
<br><br />
<br><br />
<br />
<br />
<br />
<br><br />
<br />
== About ==<br />
Cortex Command is the primary project of Data Realms LLC. The game is still in development.<br />
<br />
"In Cortex Command, you play as a prospector and explorer in a time where complete cybernetics and whole-body amputations are common practice. Your severed brain is able to control many different types of bodies remotely from its underground bunker: clones, robots, spaceships, defensive turrets, and so on.<br />
<br />
A typical scenario starts with a building phase where you get to construct your own bunker complex from scratch. Then you need to mine precious gold from the deformable pixel terrain in order to buy more and better ships, soldiers, weapons, digging tools, and deployable defenses. Use these assets to defend your disembodied brain and destroy or bankrupt your opponent!<br />
<br />
Control your team of remote bodies either directly or let the friendly AI do your bidding through real-time strategy elements built into the game. Play with up to four players in split screen -- 2 vs. 2 players, or all four cooperatively against the computer. Eventually, you can play the campaign missions together with friends..."<br />
<br />
<br />
== Story ==<br />
<br />
Earth was over. <br />
<br />
Once peaceful, our world was awash in bloodshed, wracked by wars backed by holy men. It was humanity's darkest hour, and the boldest decisions were simply all we had left. <br />
<br />
Forged in the rush of war, a curious symbiosis between man and machine formed. Our numbers bleeding away, technology enabled the survivors to control robots and clones from safety. And in the end, we found our bodies an obsolete constraint, and cast them off. Brain and mind interfaced with machines, we became more spirit than flesh-- one person living through many bodies. <br />
<br />
And in this new form we attained escape from the corpse of our world. Interstellar rocket ships for the decades-long flights to reach new worlds became common once life support for entire bodies was unnecessary. <br />
<br />
Fleeing into the dark unknown, humanity discovered it was not alone, but also not important. Humanity struggled for acceptance in this alien community, eventually forging the Orion Spur Amalgam. Interstellar trade flourished, and with it came rapid expansion. As the era of faster-than-light dawned, humanity could live again in peace and prosperity. <br />
<br />
But human nature wasn't cast off as easily. For every city and space station compounded the ever-growing hunger for resources. Worlds were stripped in civilized sectors where law ensured conquest by the highest bidder. So all eyes turned outward, to star systems where no law existed but what you could enforce. <br />
<br />
As the gold rush brings commanders from several rival groups to one such world beyond the far eastern fringes of the OSA, all prepare to assume... '''Cortex Command'''.<br />
<br />
== [[Tech | Techs]] ==<br />
''Note: Techs replaced Factions in Build 27.''<br />
Techs are distinct groups with their own sets of units, [[Weapons | weapons]], [[Tools | tools]], [[Bombs | bombs]], and even vehicles, as well as access to Free Trade products. The player acts as a kind of local commander or franchisee of one of the Techs competing with the others. Cost to buy from Techs other than your own are four times the in-Tech price.<br />
<br />
=== [[Coalition]] ===<br />
<br />
A militarized organization, the Coalition produce a large array of units and weaponry to choose from. They are versatile and powerful, making them a strong ally or a dangerous foe.<br />
<br />
=== [[Dummy]] ===<br />
<br />
These robots were originally designed as test subjects for weapons, vehicle safety measures, and other lethal experiments, but an AI controller became sentient and broke off from its manufacturers, starting a new line of robots and weapons to defend itself.<br />
<br />
=== [[Ronin]] ===<br />
<br />
Rag-tag parties of bandits who prey on weak and unsuspecting explorers. Their soldiers are unarmored and weapons primitive, but they manage to get the job done.<br />
<br />
=== [[Browncoat]] ===<br />
<br />
A strong mercenary group who are fearsome when confronted up-close. What they lack in range is made up for in durability, allowing them to close distances while soaking bullets.<br />
<br />
=== [[Imperatus]] ===<br />
<br />
The Imperatus rely on pure brute force and the reliability of their sturdy and easy to produce armored units. They use simple low rate of fire guns and cannons which tirelessly deals out good damage.<br />
<br />
=== [[Techion]] ===<br />
<br />
An elite faction formed by a few high-tech corporations. They focus on expensive units and exotic weaponry, and have the distinction of being selected by [[Free Trade]] to occassionally provide security for TradeStar activities. <br />
<br />
=== ''[[Free Trade]]'' ===<br />
<br />
''This is the "default tech". Items sold by Free Trade will be in the top-level of the Buy Menu not under a Tech heading. You cannot campaign as Free Trade, nor are they part of skirmishes.''<br />
<br />
Free Trade is a super corporation which owns and operates TradeStars, including TradeStar Midas which transports everything you purchase in the Buy Menu. They also sell a few units and [[Weapons | weapons]] of their own as well as most all the [[Tools | tools]] available.<br />
<br />
== Factions ==<br />
<br />
Some of the factions that are featured in the game. Some of these have yet to be implemented and there are more to be revealed. Some are only involved with services or storyline fluff, thus may not have soldiers or even equipment for sale.<br />
<br />
<br />
'''[[Wildlife]]'''<br />
<br />
The critters that inhabit the gold-rich planet you're on, primarily crabs. Unfortunately for them, your fighting and mining is killing them and is laying waste to their planet.<br />
<br />
<br />
'''[[Free_Trade#Culled_Clones | Undead]]'''<br />
<br />
Became "Culled Clone" units sold by [[Free Trade]] as of Build 27. They formerly were a faction first encountered in a "Zombie Cave" mission also featuring a [[Ronin]] hit squad.<br />
<br />
<br />
'''Green Dummies'''<br />
<br />
Largely identical to the familiar [[Dummy | orange Dummies]], these general purpose labor robots are only for use in the Tutorial Mission. They are what the Dummy forces were before their [[Dummy#Dummy_Controller | AI control unit]] became a sentient computer.<br />
<br />
<br />
'''[[Alchiral]]'''<br />
<br />
Alchiral is one of the largest manufacturers of organic human bodies. Most or all TradeStars in sectors with human populations carry a compliment of Alchiral VAT arrays. The technology is under strict control by Alchiral's overseers to ensure that their monopoly is maintained.<br />
<br />
<br />
'''Aliens'''<br />
<br />
Aliens, sure; you really can't tell what species the brain is can you? You might be a Zxolophlox controlling those human bodies, because human bodies makes nice organic meat puppets. The opening cinematic briefly shows various alien lifeforms that may be integrated into the game.<br />
<br />
== [[Modding]] ==<br />
Cortex Command uses a simple variable-base object designing system to allow modders to create their own entities, along with lua for more complex features. Modding is easy to learn for Cortex Command, and currently there are many mods being released every day. Released mods may range from serious and realistic to fun and silly.<br />
<br />
<br />
To find and download mods, you can go to [http://www.datarealms.com/forum/ Mod Releases].<br><br />
For help installing mods, you can go to [http://forums.datarealms.com/viewtopic.php?f=61&t=10652 How to install mods].<br />
<br />
== History ==<br />
The first recorded development of Cortex Command started on the 22nd February 2001, and was originally called D.I.R.T, by Daniel Tabar (a.k.a. DaTa, or Data), and a working alpha was released publicly some years later. Since then "Cortex Command" has gone through numerous changes and updates.<br />
<br />
As the game carried on DaTa realized that he wasn't exactly the best artist and sought the help of [http://www.itchstudios.com/psg/ Promster] (a.k.a. Prometheus). Promster's graphical changes were implemented on the 27th of July, 2004 and gave Cortex Command the graphical style that it is now known for.<br />
<br />
In 2008, he contracted several members of the community to do work for the game. These contributors included '''capnbubs''', '''TheLastBanana''' and '''numgun'''. Following a huge amount of community support, '''CaveCricket48''' was included onto the team, shortly followed by '''Lizardheim''', and '''Abdul Alhazred'''.<br />
<br />
The time lapse between public releases has occasionally been extensive, and it was for this reason, amongst other things, that the developer '''numgun''' left the team, and indeed the community. There was a gap of two years between builds 23 and 24, which was due to a lack of dedication from Data himself, and between those builds it was felt very much by the community that not enough had been accomplished. Following the release of build 24, Data improved his relations with the fans, and gave regular updates via his [http://twitter.com/#!/DataRealms/ Twitter Updates]. Very quickly build 25 was released, which was, by all accounts, a rousing success.<br />
<br />
Build 27, the last public testing release before the full version of the game, incorporated a nearly fully working campaign, and de-activated the ability to injure team-mates, amongst other modding tools.<br />
<br />
Release 1.0 was made in September 2012. It implemented all six Techs ([[Coalition]], [[Dummy|Dummies]], [[Ronin]], [[Browncoat|Browncoats]], [[Imperatus]], and [[Techion]]) in a working Campaign mode. Story mode was scraped with remnants of early stages as Mission Activities.<br />
<br />
The project has been in development for eleven and a half years. It has been submitted to the [http://en.wikipedia.org/wiki/Independent_Games_Festival Independent Games Festival] four times, and the forth time it won two awards; one for technical excellence and the other an audience award.<br />
Cortex Command has a feature on the [http://www.greatgamesexperiment.com/game/cortexcommand/?utm_source=gge&utm_medium=badge_user Great Games Experiment], and was featured in [http://www.playmagazine.com/ Play] magazine. It was also one of the prestigious [http://www.humblebundle.com Humble Indie Bundles], where it was widely well received.</div>Brendanhttps://wiki.datarealms.com/TechionTechion2013-01-22T22:57:27Z<p>Brendan: Small update to Tech status as of 1.0 release</p>
<hr />
<div>{{Tech<br />
|NameTech = Techion Tech<br />
|Image = Techion_Tech.png<br />
|FullName = Techion<br />
|InGameDesc = The Techion were formed by a small group of elite corporations focusing on high-tech research and manufacture. They are sometimes employed and trusted by the TradeStars to do guard and escort duty.<br />
|Gameplay = specialized expensive units equipped with exotic weapons<br />
|Analogy = Elves<br />
|Colors = White, with minor Dark Blue/Gray<br />
}}<br />
<br />
<blockquote><big>"The Techion were formed by a small group of elite corporations focusing on high-tech research and man[u]facture. They are sometimes employed and trusted by the [[Free_Trade | TradeStars]] to do guard and escort duty."</big> [http://androidarts.com/cortexcommand/#techion]</blockquote><br />
<br />
<br />
Techion thus far only have infantry units, no turrets, mecha, or craft. Whitebot soldiers feature prominently in Cortex Command's opening cinematics and artwork, though their white "brainmech" has yet to be seen in any builds or releases. <br />
<br />
Weaponry is somewhat exotic, with a full line of "pulsar" energy weapons similar to blasters, nanite-based weapons which destroy affected body parts, a pair of "nucleo" weapons which function like short-range seeker explosives, and a short-range kill beam called the Dihelical Cannon. Additionally the Techion have a thrown teleportation device to warp its user to wherever it lands; this provides unique bunker breaching capabilities.<br />
<br />
== Infantry ==<br />
Techion field both light and heavy conventional infantry. They are higher quality and more expensive than average, combining considerable mobility and durability.<br />
<br />
Some concept art has been released showing [http://androidarts.com/cortexcommand/Faction_Techion/CC%20techion%20concepts%202012.jpg possible Techion infantry units].<br />
<br />
=== Whitebot ===<br />
* Gold Value: 100<br />
* Description: "Light-weight yet sturdy, the versatile Whitebot performs well on and off the battlefield." <br><br />
Standard Techion trooper seen is the opening cinematic. Occasionally called a "priest bot" with its thin, aescetic appearance and plain, dark-blue body armor. <br />
<br />
=== Silver Man ===<br />
[http://androidarts.com/cortexcommand/Faction_Techion/Silverman%20preview.jpg Silver Man concept art] <br><br />
* Gold Value: 150<br />
* Description: "The Silver Man -- the Techion's heavy unit -- has a strong nanite coating which minimizes penetration damage and patches holes in seconds. As a result, it does not bleed out like other units." <br><br />
Briefly described by the developers as "not the standard Techion trooper, more a terminator-like heavy". Unusual compared to other Techion concepts for having two eyes rather than the standard cyclopian appearance. <br><br />
<br />
<br />
== Weapons ==<br />
<br />
<div style="text-align:center; margin-right:60px;"><br />
<div style="float:left; width:80px; height:80px;">[[Image:Micro_Pulsar_INDEV--1X.png]]<br/>[[Weapons#Micro_Pulsar | Micro Pulsar]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Pulse_Rifle_INDEV--1X.png]]<br/>[[Weapons#Pulse_Rifle | Pulse_Rifle]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Giga_Pulsar_INDEV--1X.png]]<br/>[[Weapons#Giga_Pulsar | Giga Pulsar]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Nanorifle_INDEV--1X.png]]<br/>[[Weapons#Nanorifle | Nanorifle]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Nucleo_INDEV--1X.png]]<br/>[[Weapons#Nucleo | Nucleo]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Dihelical_Cannon_INDEV--1X.png]]<br/>[[Weapons#Dihelical_Cannon | Dihelical Cannon]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Nucleo_Swarm_INDEV--1X.png]]<br/>[[Weapons#Nucleo_Swarm | Nucleo Swarm]]</div><br />
</div><br clear="all" /><br />
<br />
== Bombs ==<br />
<br />
<div style="text-align:center; margin-right:60px;"><br />
<div style="float:left; width:80px; height:80px;">[[Image:Nanoswarm_Canister_INDEV--1X.png]]<br/>[[Bombs#Nanoswarm_Canister | Nanoswarm Canister]]</div><br />
<div style="float:left; width:80px; height:80px;">[[Image:Warp_Grenade_INDEV--1X.png]]<br/>[[Bombs#Warp_Grenade | Warp Grenade]]</div><br />
</div><br clear="all" /><br />
<br />
== Tools ==<br />
<br />
<div style="text-align:center; margin-right:60px;"><br />
<div style="float:left; width:80px; height:80px;">[[Image:Nanolyzer_INDEV--1X.png]]<br/>[[Tools#Nanolyzer | Nanolyzer]]</div><br />
</div><br clear="all" /><br />
<br />
<br />
[[Category:Tech]]</div>Brendanhttps://wiki.datarealms.com/OffsetsOffsets2012-07-27T14:04:40Z<p>Brendan: Linked to more informative video lesson on vectors</p>
<hr />
<div>Offsets define relative positions of many things in Cortex Command. They describe individual points mapping to individual pixels within [http://en.wikipedia.org/wiki/Sprite_%28computer_graphics%29 sprites]. Those points are used to position a sprite in relation to another sprite, and Offsets relative to other Offsets. They define where things are, like the [[HDFirearm | gun]] carried by a [[AHuman | soldier]], and also where things are emitted from, like the bullets from that gun.<br />
<br />
You'll need to understand [http://en.wikipedia.org/wiki/Cartesian_coordinate_system Cartesian coordinates] and arithmetic with positive and negative numbers.<br />
<br />
== SpriteOffset ==<br />
<br />
If sprites in Cortex Command were paper drawings, cut out and pinned to a background, the SpriteOffset would be where the push pin goes though the cutout. If you spin the cutout, it spins around the pin. In physics, things spin around their own [http://en.wikipedia.org/wiki/Center_of_mass center of mass]. The SpriteOffset provides something similar.<br />
<br />
Cortex Command uses pixels, not paper, and pixels have coordinates. Any coordinate system needs an origin-- X = 0, Y = 0. The origin works like the push pin for positioning and moving sprites. If you open a sprite's image file in an image editor, all the pixels are positive [http://en.wikipedia.org/wiki/Integer integers] except the pixel up in the top left which is (0,0). But this pixel shouldn't represent the center of mass. The pixel which should-- for this and some other reasons-- is the very center one. <br><br />
'''The SpriteOffset is the center pixel's equal, opposite X and Y values that make its coordinates (0,0) when added together'''. All pixels in the image editor have positive values, so the SpriteOffset ought to be negative. And every pixel in the sprite is offset by this same amount. It's like holding the push pin still and moving the drawing under it, left and up, before sticking the correct spot. <br />
<br />
Offsets map to single pixels, but they're measured in [http://www.khanacademy.org/math/linear-algebra/v/linear-algebra--vector-examples vectors] for the math deciding where each pixel is drawn. They accept [http://en.wikipedia.org/wiki/Floating_point float values]. Though you'll never see half a pixel, the math does. Inaccurate values create inaccuracies in drawing pixels. <br><br />
<br />
=== Offset Coordinates ===<br />
<br />
Since the SpriteOffset sets the origin, coordinates for any other Offsets are relative to it. <br />
<br />
Here is where it briefly gets tricky... <br><br />
Cortex Command's coordinates differ from Cartesian in one important way: the Y (or vertical) axis is inverted-- up is negative-Y. Left is still negative-X, and right positive. This has been tested and checked in-game for all the Offsets described here. <br />
<br />
To assign any other Offset to a pixel of the sprite, count how many pixels away it is from the SpriteOffset origin pixel horizontally and vertically, paying attention to which directions are positive and negative.<br />
<br />
== Offset ==<br />
<br />
Used by Exit hatches on [[ACRocket | ACRockets]] and Terrain material bitmaps. Also used by the Gib entity; this is best left to the Gib Editor included in Cortex Command.<br />
<br />
<br />
== Bitmap Offset ==<br />
<br />
Used for static elements on a map, including TerrainObject set pieces, Bunker Backgrounds and Bunker Bits, as well as the old Brain Vault, Rocket Silo, and Wall. Almost all of their vectors are 0,0 but certain Geology objects and the three old Bunker modules use negative vectors.<br />
<br />
<br />
== EmissionOffset ==<br />
<br />
Used by [[AEmitter]] entities to define which pixel the things it emits are emitted from, in many ways similar to [[Offsets#MuzzleOffset | MuzzleOffset]].<br />
<br />
<br />
== ParentOffset ==<br />
<br />
Used to adjust the positioning of things logically attached as a "child" to a sprite. These things are typically sprites themselves or an emitter. Magazines attached to HDFirearms use ParentOffset to position themselves correctly. However, it accepts values beyond the pixel area of the sprite attached to.<br />
<br />
<br />
== JointOffset ==<br />
<br />
Used in connecting animated objects together. It specifies a pixel as a joining point which will be used automatically by anything Cortex Command is setup to join with it. Parts of an [[Actors | Actor's]] body are joined to each other with via JointOffset, as are various [[Devices]] like guns and tools. This applies to Actor types like [[ADoor]], [[ACRocket]], and [[ACDropShip]]. Attachable effects and [[AEmitter]] also use this.<br />
<br />
For [[HDFirearm]]s, the JointOffset is where the FGArm (foreground arm) Hand is positioned, typically where the trigger is drawn but it has no effect on firing the [[Weapons | weapon]] or [[Tools | tool]]. If placed too far for an AHuman's Hand to reach, the arm will twitch, trying and failing to reach the JointOffset.<br />
<br />
<br />
== Device-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Devices]]: [[HeldDevice]]s, [[HDFirearm]]s, or [[TDExplosive]]s.<br />
<br />
=== SupportOffset ===<br />
<br />
This defines where the BGArm (background arm) Hand of AHuman is positioned on a Device. Even one-handed devices specify a SupportOffset, though it tends to be close to the JointOffset. Excessive values have the same effect on the BGArm as excessive [[Offsets#JointOffset | JointOffsets]] have on the FGArm.<br />
<br />
=== StanceOffset ===<br />
<br />
Adjustment where the SpriteOffset of a [[HeldDevice]], [[HDFirearm]], or [[ThrownDevice]] lines up with the SpriteOffset of the [[Actors]] carrying it. If a Device is meant to be carried high, slung low, held forward, or tucked back, this is where it should be specified, not SpriteOffset. Note that changing the StanceOffset '''does not change other Offsets'''-- they remain relative to SpriteOffset only. However, excessive values on StanceOffset can put other Offsets beyond reach of an AHuman's Hands.<br />
<br />
=== SharpStanceOffset ===<br />
<br />
Adjustments where a [[HeldDevice]] or [[HDFirearm]] and an Actor's [[Offsets#SpriteOffset | SpriteOffsets]] align, but only when stopping to aim. Most weapons (and even the [[Tools#Diggers | diggers]], for some reason) are carried higher to "look down the sights" though it can be set arbitrarily. Like SupportOffset, all other Offsets on the Device stay relative to the SpriteOffset, thus the "move with" the Device.<br />
<br />
=== MuzzleOffset ===<br />
<br />
Defines the pixel where any Round an [[HDFirearm]] fires are emitted from. Typically this is the forward tip of the barrel, but it can be placed arbitrarily, even outside the sprite's pixel area.<br />
<br />
=== EjectionOffset ===<br />
<br />
The pixel where any Shell will be emitted from the sprite of an HDFirearm. <br />
<br />
<br />
=== StartThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5).<br />
<br />
=== EndThrowOffset ===<br />
<br />
Used with [[TDExplosive | TDExplosives]] such as grenades. Almost always (-12,-5) but sometise (12,-5).<br />
<br />
<br />
== Actor-Specific Offsets ==<br />
These Offsets are used only by the various types of [[Actors]]: [[AHuman]]s, [[ACrab]]s, [[ACRocket]]s, [[ACDropShip]]s, or [[ADoor]]s.<br />
<br />
=== IdleOffset ===<br />
<br />
Used to position the Hand on an Arm when its Actor isn't equipped with any Device, and for the Foot on a Leg when standing.<br />
<br />
=== ExtendedOffset ===<br />
<br />
Defines where the Foot of an Actor is positioned relative to the Actor's SpriteOffset when standing. Note that these coordinates assume the Leg being oriented horizontally as sprites for them are.<br />
<br />
=== ContractedOffset ===<br />
<br />
Used when crouching, this defines where the Foot of an Actor is positioned relative to the Actor's SpriteOffset. Note that these coordinates assume the Leg being oriented horizontally as sprites for them are.<br />
<br />
=== StartOffset ===<br />
<br />
Used in the various LimbPath animation definitions, this specifies a target coordinate for the Limb to move to.<br />
<br />
=== HolsterOffset ===<br />
<br />
Not commonly used, if at all. Cortex Command currently does not "holster" any items when unequipped. Appears in both AHuman and ACRocket definitions.<br />
<br />
<br />
=== OpenOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when it opens.<br />
<br />
=== ClosedOffset ===<br />
<br />
Used by [[ADoor | doors]] to specify where the "door" part moves to when the door is closed.<br />
<br />
<br />
[[Category:Modding]]</div>Brendanhttps://wiki.datarealms.com/User_talk:DamanUser talk:Daman2012-07-14T04:22:56Z<p>Brendan: /* Uploaded images calling mkdir() ??! */ new section</p>
<hr />
<div>== Questions ==<br />
Could I have permission to change the images displayed on the front page?<br />
Mainly the Lua image, which is hideously scaled, and perhaps also the Cortex Command 'C'.<br />
Thanks. [[User:Petethegoat|-Petethegoat]] 17:23, 4 June 2010 (UTC)<br />
<br><br><br />
Also, is there anywhere suitable for general discussion and questions about the wiki? Ex: Is there an easy method of flagging up a page for deletion? [[User:Petethegoat|-Petethegoat]] 18:46, 4 June 2010 (UTC)<br />
<br />
*You can talk about the wiki on the forum. General discussion or feedback or even OT is good. Add a talk section to the main page about what you think needs to be replaced and your proposed replacements, I'd like to see. Pages can be marked for deletion using <pre>{{MarkDelete}}</pre><br />
<br />
also now my fanclub is gone :( {{User:Daman/sig}} 19:20, 4 June 2010 (UTC)<br />
<br />
Thanks for my unblocking. I continue to fill Russian section. [[User:Ximximik|Ximximik]] 16:24 5 June 2010 (UTC)<br />
<br />
<br />
Well, I got around to adding some suggestions/questions to the main talk page the other day, and I'd like to know your thoughts on [[Talk:Main Page|my thoughts]]. [[User:Petethegoat|-Petethegoat]] 01:18, 10 June 2010 (UTC)<br />
<br />
== Spam and your signature. ==<br />
<br />
Well, as the title says, your sig seems to be attracting some spam that can evade the filters.<br />
I'd lock it, but you haven't given me the power yet. (that is some super-subtle hinting going on there)<br />
[[User:Petethegoat|-Petethegoat]] 23:06, 13 June 2010 (UTC)<br />
<br />
== drlwiki.thebunny.info ==<br />
<br />
I assume you're able to merge any changes made to this back into the old wiki?<br />
[[User:Petethegoat|-Petethegoat]] 15:08, 1 July 2010 (UTC)<br />
<br />
== Enormous Block of Lua. ==<br />
<br />
<code lua n>require("bass")<br />
<br />
include('shared.lua')<br />
<br />
SetupBrowserMat(ENT, "chrome/radio", 720, 480, 0.075)<br />
<br />
local zerovec = Vector(0,0,0)<br />
local MaxNameLength = 32<br />
<br />
hook.Add("CanMousePress", "DisableRadio", function()<br />
<br />
for _, v in pairs( ents.FindByClass( "gmt_radio" ) ) do<br />
if v.Browser && v.MouseRayInteresct && v:MouseRayInteresct() then<br />
return false<br />
end<br />
end<br />
<br />
end )<br />
<br />
usermessage.Hook("ShowRadioSelect", function(umsg)<br />
local ent = umsg:ReadEntity()<br />
<br />
if !BASS || !chrome then<br />
GtowerMessages:AddNewItem( GetTranslation("PleaseFullGtowerPack") )<br />
return<br />
end<br />
<br />
if ent.Browser then<br />
ent.DrawTranslucent = ent.BrowserDraw<br />
return<br />
end<br />
<br />
ent:InitBrowser(ent:GetTable())<br />
ent.Browser:LoadURL("http://www.gmodtower.org/gmtonline/radio/")<br />
ent.DrawTranslucent = ent.BrowserDraw<br />
ent.CursorOut = 0<br />
end)<br />
<br />
local GreenBox = Color(0, 255, 0, 50)<br />
local RedBox = Color(255, 0, 0, 50)<br />
<br />
ENT.RenderGroup = RENDERGROUP_BOTH<br />
<br />
function ENT:OpeningURL(url)<br />
self:ForcePlaySelect()<br />
print("opening", url)<br />
<br />
return <br />
end<br />
<br />
self:RemoveBrowser()<br />
self.DrawTranslucent = self.MessageDraw<br />
end<br />
<br />
function ENT:FinishLoading()<br />
self:ForcePlaySelect()<br />
end<br />
<br />
function ENT:OnEnterBrowser()<br />
self.CursorOut = 0<br />
end<br />
<br />
function ENT:OnLeaveBrowser()<br />
self.CursorOut = CurTime() + 2<br />
end<br />
<br />
function ENT:Initialize()<br />
self.BoxColor = RedBox<br />
self.DrawTranslucent = self.MessageDraw<br />
<br />
if BASS == nil then<br />
self.DrawMessage = GetTranslation("PleaseFullGtowerPack")<br />
return<br />
end<br />
<br />
self.DrawMessage = GetTranslation("RadioTurnedOff")<br />
self.CurStation = ""<br />
self.radiostream = nil<br />
<br />
self.NextCalcName = 0<br />
self.TextWidth, self.TextHeight = 150, 20<br />
self.CurName = ""<br />
self.ShouldDrawName = false<br />
<br />
self.TextOffset = 0<br />
self.TargetTextOffset = 0<br />
<br />
self:SetNetworkedVarProxy("CurChan", self.ChannelChanged )<br />
<br />
self:SetLargeBounds()<br />
self.CursorOut = 0<br />
end<br />
<br />
function ENT:StopRadio()<br />
if self.radiostream then<br />
self.radiostream:stop()<br />
end<br />
<br />
self.BoxColor = RedBox<br />
self.DrawMessage = GetTranslation("RadioTurnedOff")<br />
<br />
if !self.Browser then<br />
self.DrawTranslucent = self.MessageDraw<br />
end<br />
<br />
self.ShouldDrawName = false<br />
self.radiostream = nil<br />
end<br />
<br />
function ENT:CalculateEarShot()<br />
if !GTowerLocation then<br />
self.InEarShot = true<br />
return<br />
end<br />
<br />
local radioloc = GTowerLocation:FindPlacePos(self:GetPos())<br />
local plyloc = GTowerLocation:FindPlacePos(LocalPlayer():GetPos())<br />
<br />
self.InEarShot = radioloc != nil && plyloc != nil && (plyloc == radioloc)<br />
end<br />
<br />
function ENT:StartRadio( stream )<br />
if !stream || #stream == 0 then return end<br />
<br />
self.BoxColor = GreenBox<br />
self.DrawTranslucent = self.RadioDraw<br />
<br />
self:RemoveBrowser()<br />
<br />
BASS.StreamFileURL(stream, 0, function(basschannel, error)<br />
if self.DrawTranslucent != self.RadioDraw then<br />
return // this means we stopped it between the startradio and this callback<br />
end<br />
<br />
self:CalculateEarShot()<br />
<br />
print("Ready to play", self.InEarShot)<br />
if !self.InEarShot then<br />
self:StopRadio()<br />
return<br />
end<br />
<br />
if !basschannel then<br />
print("Error streaming file", error)<br />
if error == 40 || error == 2 then<br />
self.DrawMessage = GetTranslation("RadioTimeout")<br />
elseif error == 41 then<br />
self.DrawMessage = GetTranslation("RadioUnsupportedFormat")<br />
elseif error == 8 then<br />
self.DrawMessage = GetTranslation("RadioBASSInitError")<br />
else<br />
self.DrawMessage = GetTranslation("RadioUnknown") .. " " .. tostring(error)<br />
end<br />
self.BoxColor = RedBox<br />
self.DrawTranslucent = self.MessageDraw<br />
<br />
return<br />
end<br />
<br />
self.radiostream = basschannel<br />
self.radiostream:set3dposition(self:GetPos(), zerovec, zerovec)<br />
<br />
self.radiostream:play()<br />
<br />
self.NextCalcName = 0<br />
end)<br />
end<br />
<br />
function ENT:ChannelChanged( name, oldval, nwc )<br />
<br />
if nwc == self.CurStation then return end<br />
<br />
self.CurStation = nwc<br />
<br />
if #nwc == 0 && self.StopRadio then<br />
self:StopRadio()<br />
return<br />
end<br />
<br />
if !self.StartRadio then return end<br />
<br />
print("station", self.Stream)<br />
<br />
self:CalculateEarShot()<br />
if !self.InEarShot then return end<br />
<br />
self:StartRadio(self.Stream)<br />
end<br />
<br />
function ENT:OnRemove( )<br />
self:RemoveBrowser()<br />
self:StopRadio()<br />
end<br />
<br />
function ENT:BaseDraw()<br />
local EntPos = self:GetPos() + ( self:GetForward() * 4 ) + self:GetUp() * -5<br />
local PlyDistance = EntPos:Distance( LocalPlayer():GetPos() )<br />
<br />
<br />
if PlyDistance > 350 then<br />
return<br />
end<br />
<br />
local ang = self:GetAngles()<br />
<br />
<br />
if (LocalPlayer():GetPos() - EntPos ):DotProduct( ang:Forward() ) < 0 then<br />
return<br />
end<br />
<br />
local AlphaRatio = 1.0<br />
<br />
if PlyDistance > 128 then<br />
AlphaRatio = 1 - (PlyDistance - 128) / 222<br />
<br />
self.BoxColor.a = AlphaRatio * 50<br />
<br />
else<br />
self.BoxColor.a = 50<br />
end<br />
<br />
ang:RotateAroundAxis(ang:Right(), -90 )<br />
ang:RotateAroundAxis(ang:Up(), 90 )<br />
<br />
cam.Start3D2D( EntPos , ang, 0.1)<br />
<br />
return AlphaRatio<br />
end<br />
<br />
function ENT:MessageDraw()<br />
local AlphaRatio = self:BaseDraw()<br />
<br />
if AlphaRatio == nil then return end<br />
<br />
self:DrawMyText( self.DrawMessage, AlphaRatio )<br />
<br />
cam.End3D2D()<br />
end<br />
<br />
<br />
function ENT:Draw()<br />
self:DrawModel()<br />
end<br />
<br />
function ENT:GetPosBrowser()<br />
return self:GetPos() + (self:GetForward() * 4)<br />
end<br />
<br />
function ENT:DrawBrowser()<br />
surface.SetDrawColor(255, 255, 255, 255)<br />
surface.SetTexture(self.TexId)<br />
surface.DrawTexturedRect(0,0, self.TexWidth, self.TexHeight)<br />
<br />
if self.CursorOut > 0 then<br />
surface.SetDrawColor(100, 100, 100, 150)<br />
surface.DrawRect(0, 0, self.Width, self.Height)<br />
end<br />
end<br />
<br />
function ENT:BrowserDraw()<br />
if !self.Browser then<br />
self.DrawTranslucent = self.MessageDraw<br />
return<br />
end<br />
<br />
self:BaseBrowserDraw()<br />
end<br />
<br />
function ENT:RadioDraw()<br />
if self.radiostream && !self.radiostream:getplaying() then<br />
self:StopRadio()<br />
return<br />
end<br />
<br />
local AlphaRatio = self:BaseDraw()<br />
<br />
if AlphaRatio == nil then return end<br />
<br />
if self.radiostream && self.ShouldDrawName then<br />
self:DrawMyText( GetTranslation("RadioPlaying") .. ": " .. self.CurName, AlphaRatio )<br />
else<br />
self:DrawMyText( GetTranslation("RadioLoading"), AlphaRatio )<br />
end<br />
<br />
self:DrawSpectrumAnalyzer()<br />
<br />
cam.End3D2D()<br />
<br />
end<br />
<br />
function ENT:DrawMyText( text, AlphaRatio )<br />
<br />
surface.SetFont( "ChatFont" )<br />
<br />
local w,h = surface.GetTextSize( text )<br />
<br />
draw.RoundedBox(4, -100 , -145, w + 16, h + 8 , self.BoxColor )<br />
<br />
surface.SetTextColor( 255, 255, 255, 255 * AlphaRatio)<br />
surface.SetTextPos( -100 + 8 , -145 + 4 ) <br />
surface.DrawText(text)<br />
<br />
end<br />
<br />
local SPECHEIGHT= 64<br />
local SPECWIDTH = 300<br />
local BANDS = 28<br />
local ox, oy = -100, -45<br />
<br />
function ENT:DrawSpectrumAnalyzer()<br />
local chan = self.radiostream<br />
if !chan then return end<br />
<br />
local fft = chan:fft2048()<br />
local b0 = 0<br />
<br />
surface.SetDrawColor(0, 0, 255, 255)<br />
<br />
for x = 0, BANDS-2 do<br />
local sum = 0<br />
local sc = 0<br />
local b1 = math.pow(2,x*10.0/(BANDS-1))<br />
<br />
if (b1>1023) then b1=1023 end<br />
if (b1<=b0) then b1=b0+1 end<br />
sc=10+b1-b0;<br />
while b0 < b1 do<br />
sum = sum + fft[2+b0]<br />
b0 = b0 + 1<br />
end<br />
y = (math.sqrt(sum/math.log10(sc))*1.7*SPECHEIGHT)-4<br />
y = math.Clamp(y, 0, SPECHEIGHT)<br />
<br />
surface.DrawRect(ox + (x*(SPECWIDTH/BANDS)), oy - y - 1, (SPECWIDTH/BANDS) - 2, y + 1)<br />
end<br />
end<br />
<br />
function ENT:Think()<br />
if self.Browser then<br />
self:MouseThink()<br />
if self.CursorOut > 0 && CurTime() > self.CursorOut then<br />
self:RemoveBrowser()<br />
self.DrawTranslucent = self.MessageDraw<br />
end<br />
end<br />
if self.radiostream then self:RadioThink() end<br />
end<br />
<br />
function ENT:RadioThink()<br />
local pos = self:GetPos()<br />
pos.z = -pos.z<br />
<br />
self.radiostream:set3dposition(pos, zerovec, zerovec)<br />
end<br />
<br />
hook.Add("Location", "PlayerLeaveRoomRadio", function(ply, location)<br />
if ply != LocalPlayer() || !BASS then return end<br />
<br />
for k, v in ipairs(ents.FindByClass("gmt_radio")) do<br />
if v.CalculateEarShot then<br />
v:CalculateEarShot()<br />
<br />
if !v.InEarShot && v.radiostream then<br />
v:StopRadio()<br />
elseif v.InEarShot && !v.radiostream then<br />
v:StartRadio(v.Stream)<br />
end<br />
end<br />
end<br />
end)<br />
<br />
local function BassThink()<br />
local ply = LocalPlayer()<br />
<br />
local eyepos = ply:EyePos()<br />
eyepos.z = -eyepos.z<br />
<br />
local vel = ply:GetVelocity()<br />
<br />
local eyeangles = ply:GetAimVector():Angle()<br />
<br />
// threshold, 89 exact is backwards accord to BASS<br />
eyeangles.p = math.Clamp(eyeangles.p, -89, 88.9)<br />
<br />
local forward = eyeangles:Forward()<br />
local up = eyeangles:Up() * -1<br />
<br />
BASS.SetPosition(eyepos, vel * 0.005, forward, up)<br />
end<br />
<br />
if BASS then<br />
hook.Add("Think", "UpdateBassPosition", BassThink )<br />
end<br />
</code><br />
<br />
== Uploaded images calling mkdir() ??! ==<br />
<br />
I'm a little alarmed by this, but on some of the images I've recently uploaded, I consistently get these errors appearing...<br />
<br />
Warning: mkdir() [function.mkdir]: Permission denied in /home/drlwiki/public_html/includes/GlobalFunctions.php on line 2176<br />
<br />
Warning: wfMkdirParents: failed to mkdir "/home/drlwiki/public_html/images/thumb/c/c6/Bulldog_GG-49_INDEV--4X.png" mode 511 in /home/drlwiki/public_html/includes/GlobalFunctions.php on line 2179<br />
File:Bulldog GG-49 INDEV--4X.png<br />
<br />
Is this something the wiki is doing when images of a certain sizes are uploaded, or are these files infected??</div>Brendanhttps://wiki.datarealms.com/User:BrendanUser:Brendan2012-07-14T04:17:21Z<p>Brendan: </p>
<hr />
<div>I've scheduled 2000 - 2200 [http://www.zulutime.net/ Zulu]/UCT/[http://wwp.greenwichmeantime.com/gmt-converter/ GMT] on Fridays and Saturdays for wiki work. <br />
If you're a subject expert, I'll handle the writing while you handle the facts and everyone winds up happy! Just contact me to set up a real-time collaboration on Skype at my name hyphen hill.<br />
<br />
= Current =<br />
Below is my current wiki task list with time estimates. This is where my most current list will always be found.<br />
* <s>Add link to Azukki's for interrim || less time than it takes to write this</s><br />
* Make, upload, and add illustrations to [[Offsets]] article || 45 min.<br />
<br />
<br />
= Next =<br />
My next article project is: ''[http://forums.datarealms.com/viewtopic.php?f=1&t=14662 With the Sharpness]''</div>Brendan