Modding Term Disambiguations
There seems to be quite a few problems floating around that could have been solved from the start if the OP had known more about terms that are tossed around regularly. Thus this topic, which should hopefully fix things.
- Palette'd image
This is probably the #1 problem beginning modders have with Cortex modding. Think of it like this: When a painter goes to paint a picture, he has a set of colors he will use and those colors only, which is called a Palette. Every sprite in Cortex (aside from some exceptions which I will not cover) uses one of two palettes, for reasons that are not necessary to go into. Thus, every sprite you make (aside from exceptions) must be in palette, and how you do this is covered in detail in this topic. The palette files can be downloaded in this topic.
- ini code vs Lua code
Since the advent of Lua scripting, newcomers to Cortex seem to have gotten things a bit mixed up and believe that you must know how to write Lua code to mod Cortex. This is untrue, you can make a fully functional mod without a drop of Lua, just like pre-b23 (or was it b22...). To illustrate, here is a side-by-side comparison of ini code, which is necessary, and Lua code, which is not.
Code:
//////////////////ini//////////////////
AddEffect = MOPixel
PresetName = Particle Coalition Shotgun
Mass = 0.2
AirResistance = 0.025
LifeTime = 250
Sharpness = 20
HitsMOs = 1
GetsHitByMOs = 0
Code:
//////////////////Lua//////////////////
function Create(self)
--The timer that will measure out the missile's events.
self.LTimer = Timer();
--The missile's target, currently set to nothing.
self.target = nil;
--Find out who shot the weapon by finding the closest actor within 50 pixels.
local curdist = 50;
for actor in MovableMan.Actors do
local avgx = actor.Pos.X - self.Pos.X;
local avgy = actor.Pos.Y - self.Pos.Y;
local dist = math.sqrt(avgx ^ 2 + avgy ^ 2);
if dist < curdist then
curdist = dist;
self.parent = actor;
end
end
- Converting mods
Mod conversion entails taking a mod that was created on an earlier version of Cortex and making it work for later versions. There are but a few things to do.
1. For any mod pre-b22, you must first use the convenient mod conversion tool here to convert it to b22.
If it works at this point, congrats, enjoy your mod. However, if the mod loads but the screen goes black and will not proceed after entering a skirmish or mission, you must also perform step 2:
2. Search through the converted mod's .ini files for lines beginning in "PresetName =" and make sure that the word(s) that follow it on the same line follow the rule of spaces, which is that no word can exceed 11* nonspace characters. This is to say, "thisisalongword" would cause the problem, while making it into "this is a long word" would fix it.
Now I know I haven't answered all questions, and this is not meant to be a catch-all FAQ, but pm me with questions and I will continue to add them here. Before you do though, check
here or
here to make sure your question is not already covered.