The Neon Signs mod adds in custom XML, custom Icon, custom Resource, and custom Scripts to the game.
We've already covered the Configs folder, but we'll touch base again with it to show how three08 is using it, and more precisely, what he's added.
<configs> <config name="blocks"> <append xpath="/blocks"> <block id="1630" name="Neon Open Sign"> <property name="Extends" value="ceilingLight02_player" /> <property name="CustomIcon" value="openSign" /> <property name="Class" value="NeonSign, Mods" /> <property name="Model" value="#NeonSign?NeonOpenSignPrefab"/> <property name="Collide" value="movement,melee,rocket" /> <property name="HandleFace" value="South" /> <property name="TakeDelay" value="5" /> <property name="AllowRemotePower" value="false" /> <property name="LightObject" value="NeonText" /> </block> <!-- Snipped contents --> |
Three08's Neon Sign mod contains a few new blocks and recipes. In the one above, he's Extending the ceilingLight02_player block.
He's also referencing a CustomIcon, which we will find under the Icons folder. Even the Model value looks familiar, making a reference to the #Neon?NeonOpenSignPrefab ( #Neon = Filename is Neon.Unity3d, and NeonOpenSignPrefab is the asset in it ).
What is different, is the "Class" line. It's referencing "NeonSign, Mods". That tells the game that there's special code to be run for it, located in the Mods.dll, called NeonSign. We'll go over this new NeonSign Class in the next section.
The Icons and Resources folders, as we've shown previously, contains the custom icons and unity3d files for the mod.
So three08 added 4 new custom icons for the game, with only one unity3d file (shown below). In our previous examples, there's was usually just one model in each unity3d file. However, that doesn't mean that there can't be more. A unity3d bundle can have many custom models embedded in it, being referenced individually using the ?<model name> reference, while keeping the #<BundleName> the same.
If you look at the Neon Sign XML file, you'll see the following references. We only copied the relevant lines, rather then entire blurb.
<property name="Model" value="#NeonSign?BowlingNeonSignPrefab"/> <property name="Model" value="#NeonSign?NeonOpenSignPrefab"/> <property name="Model" value="#NeonSign?NeonOpenSign2Prefab"/> <property name="Model" value="#NeonSign?PizzaSignPrefab"/> <property name="Model" value="#NeonSign?GunNeonSignPrefab"/> |
So we see in his Mod that he actually has 5 custom models, and they are all stored in the same unity3d file.
The Scripts folder, however, is new for us.
Let's explore on what these files are, and how they are different than the PatchScripts in the Bigger Back Pack Mod.
Created with the Personal Edition of HelpNDoc: Produce electronic books easily