N
Register
Advertisement

Mods for NReality take the form of a string added to the end of the standard map data. When the map is loaded, the string disappears and the modifications are applied. The string is formatted like this:

TileData|ObjectData|BackgroundImage|ForegroundImage|NRealityMapType|ObjectMod|PlayerMod|AreaTrigger

Background Image[]

This function allows a URL image to be inserted into the map. A Background Image will be displayed in the background and will be covered by tiles and objects.

Foreground Image[]

This function also allows a URL image to be inserted into the map. A Foreground Image will be displayed in front of everything else in the map, meaning if you want to see anything, you will need to use a program that can

The foreground image can also be made into a color filter. To do this, add ?# to the end of the image URL, where # is a number between 1 and 14.

NReality Map Type[]

Any text in this slot will appear as a map's category when the map is displayed in the userlevels menu.

Object Mods[]

This allows modifications to any type of object, modifications to the ninja are done in the Player Mods section. Most modifications are applied to every object of the selected type, a few have individual object properties which will override the global object modification.

Object modifications are added by adding:
ObjectNumber,Property,Modification
to the end of the map data after four verticle bars

ObjectNumber
The type of object and must be a number between 0 and 141 depending on the objects number.
Property
The property of the object to be modified.
Modification
The value of the property, it must be a number.

Multiple can be added by seperating them with a semi-colon.

Object Numbers
0: Zap & Seeker Drones
1: Laser & Rotating Laser Drones
2: Chaingun Drone
3: Gold
4: Bounce Block
5: Launchpad
6: Gauss Turret
7: Floor guards
8: Ninja
9: Drones
10: One-way Platform
11: Thwump
12: Doors
13: Rocket Turret
14: Exit
15: Mine
16: Force Field Drone
101, 102, 103: Ghost Drones
121: Rocky Drone
122: Tile Drone
132: Alarm Drone
141: Greedy Drone

Glitched drones/Eye Drones cannot be modified because the game does not recognize them as any of the three modifiable types of drones.

No matter how big you make an object, it cannot interact with the ninja unless they are in the same grid square or an adjacent one.

Zap & Seeker Drones[]

Object Number: 0

r
Default = 9
Size
Speed
Default = 1.75
ChaseSpeed
Default = 3.423
Seeker Drones Only

0 is treated as the default value. If you want a drone to stop when it sees the ninja, use a very low value instead.

Also, speed and chaseSpeed can be modified per drone, by use of ^speed,chaseSpeed after the drone's code.

Laser & Rotating Laser Drones[]

Object Number: 1

r
Default = 9
Size
Speed
Default = 0.385
LaserPrefireDelay
Default = 30
The amount of time the drone will spend charging
LaserPostFireDelay
Default = 40
How long the drone will pause after firing
LaserRate
Default = 80
How long the drone will fire
LaserLen
Default = 7
Usage unknown

Rotating laser drone
StartingAngle
Default = 0
Starting angle of the laser
RotateSpeed
Default = 0.5
Speed the laser rotates
A negative number will change the direction
FixedLaserLength
Leave blank to have the laser act normal
If set the laser will always be a fixed number of pixels long & can go through walls
AlwaysMove
Boolean
Rotating Laser Drones will move as they fire and rotate

Individual Rotating Laser Drone[]

6^x,y,Path,1,1,Direction^StartingAngle,RotationSpeed,LaserLength,AlwaysMove,Speed

StartingAngle
Default = 0
Starting angle of the laser
RotationSpeed
Default = 0.5
Speed the laser rotates
LaserLength
Leave blank to have the laser act normal
If set the laser will always be a fixed number of pixels long & can go through walls
AlwaysMove
Boolean
The Rotating Laser Drone will move as it fires and rotates Speed
Default = 0.385

Chaingun Drone[]

Object Number: 2

r
Default = 9
Size
Speed
Default = 0.645
ChaingunPrefireDelay
Default = 35
Amount of time the drone will spend charging
ChaingunPostfireDelay
Default = 60
How long the drone will pause after firing
ChaingunMaxNum
Default = 8
Usage unknown
ChaingunRate
Default = 6
Time in frames between each bullet
ChaingunSpread
Default = 0.3
Usage unknown

Gold[]

Object Number: 3

r
Default = 6
Size

Bounce Block[]

Object Number: 4

Stiff
Default = 0.05
Speed at which the Bounce Block bounces back, a very high or very low number may prevent it from doing so
Mass
Default = 0.2
Amount of force the block applies against the ninja, a negative number will make it propel the ninja
SleepThreshold
Default = 40
After how much time in frames after the ninja stops touching the Bounce Block will stop moving
SleepTimer
Default = 0
Usage unknown

Launchpad[]

Object Number: 5

r
Default = 6
Size
Strength
Default = 5.1428568
Launchpad strength

Gauss Turret[]

Object Number: 6

CloseAimSpeed
Default = 0.05
How fast the crosshairs move when close to the ninja, represents the percentage of the distance between them covered
MidAimSpeed
Default = 0.035
How fast the crosshairs move when a medium distance away from the ninja
FarAimSpeed
Default = 0.03
How fast the crosshairs move when far away from the ninja
AimSpeed
Default = 0.03
How fast the crosshairs move the frame after the turret fires
OuterThreshold
Default = 9216
Set 'Far' distance
MidThreshold
Default = 1764
Set 'Mid' distance
InnerThreshold
Default = 576
Set 'Close' distance
ShotRate
Default = 60
Minimum time between shots
ShotTimer
Default = 0
Usage unknown
FireDelayTimer
Default = 0
Usage unknown
PrefireDelay
Default = 10
Turrets warm-up time
PostfireDelay
Default = 10
Turrets cooldown time

Floor Guards[]

Object Number: 7

r
Default = 6
Size
Speed
Default = 5.1428568

Values over about 30 for thier size will only continue to increase the aesthetic size; the maximum size of their collision detection zone is 30.

Increasing the size can have adverse effects on their placement; when one attempts to load the code, it changes the guard's location on the Y axis to compensate for the size (so that the bottom of the guard will still touch the bottom). When going into the editor, it reverts changes, but keeps the coordinates intact, which leads to newly located guards, moved upwards. Adding the code again and loading will again compensate, moving the guard even further up. Furthermore, attempting to move the guard manually in the editor, while helping, still does not completely eradicate the changes; when exiting out of the editor, the guards will be moved back up, though to a lesser amount.

Individual Floor Gaurd[]

4^x,y,1^Type,Speed,AlwaysChase

Type
0 = Floor
1 = Ceiling
2 = Left Wall
3 = Right Wall
Speed
Default = 5.142856
AlwaysChase
Boolean
Floor Gaurds will always chase the ninja regardless of thier current position

Drones[]

Object Number: 9

No known properties

One-way Platform[]

Object Number: 10

You can use special triggers to make oneway platforms appear and disappear.

oneway special off: make the one way disappear

oneway special on:
case 1: if the one way has disappeared, it will reappear
case 2: if the one way is not disappeared, then it will rotate 90 degree

See more on special triggers here.

Thwump[]

Object Number: 11

xw
Default = 9
Width
yw
Default = 9
Height
Fallspeed
Default = 4.2857148
Speed of falling Thwump
Raisespeed
Default = 1.7142852
Speed of rising/retracting Thwump
Speed
Duplicate of Fallspeed

Doors[]

Object Number: 12

r
Default = 10
Usage unknown
Doorsize
Default = 10
Usage unknown
Maxtimer
Default = 5
How long Normal Doors stay open after the ninja passes through

Rocket Turret[]

Object Number: 13

Speed
Default = 0
Usage unknown
Maxspeed
Default = 3.4285716
Rockets maximum speed
Startaccel
Default = 0.1
Rockets starting speed
Curaccel
Duplicate of startaccel
Accelrate
Default = 1.1
Rockets acceleration
Turnrate
Default = 0.1
How far the rocket turns in one frame, at high values it turns too far & becomes less accurate
IsHoming
Default = 0
Usage unknown
PrefireDelay
Default = 10
How long the turret waits before firing a rocket
FireDelayTimer
Default = 0
Usage unknown

Exit[]

Object Number: 14

r
Default = 12
Does not effect the exit switch
Size

27 is the functional limit. The door will still aesthetically grow, but will functionally be 27 pixels wide.

Mine[]

Object Number: 15

r
Default = 4
Size

40 is the functional limit. The mines will still aesthetically grow, but they functionally be 40 pixels wide.

Force Field Drone[]

Object Number: 16

This drone repels or attracts the ninja towards or away from it when it reaches a certain range.

r
Default = 9; Size
Speed
Default = 1.75;
DetectRadius
Default = 100
Distance at which the drone starts firing
ForcePower
Default = 4
Force at which the ninja is pushed away from the drone, the ninjas velocity is reset
A negative number will pull the ninja towards the drone
ForceDelayTimer
Default = 10
Length of the drones cooldown time, the drone keeps moving during this time
ForceMaxCount
Default = 3
Number of consecutive shots the drone can fire before recharging
ForceMaxCountDelay
Default = 200
Time spent in frames recharging after ForceMaxCount is reached
AlwaysMove
Default = 0
Boolean
The Force Field drone will keep moving while firing

Individual Force Field Drone[]

6^x,y,Path,0,16,Direction^DetectRadius,ForcePower,ForceDelayTimer,ForceMaxCount,ForceMaxCountDelay,AlwaysMove

DetectRadius
Default = 100
Distance at which the drone starts firing
ForcePower
Default = 4
Force at which the ninja is pushed away from the drone, the ninjas velocity is reset
A negative number will pull the ninja towards the drone
ForceDelayTimer
Default = 10
Length of the drones cooldown time, the drone keeps moving during this time
ForceMaxCount
Default = 3
Number of consecutive shots the drone can fire before recharging
ForceMaxCountDelay
Default = 200
Time spent in frames recharging after ForceMaxCount is reached
AlwaysMove
Boolean
The Force Field drone will keep moving while firing

Ghost Drone[]

Object Numbers: 101, 102, 103

Ghost drones follow the ninja whenever he isn't facing towards them and stop when he is (A reference to a "boo" from super mario bros.)

Acceleration
Default = 0.02
Acceleration in pixels per frame
Maximum Velocity
Default = 2
Maximum speed
Always Chase
Boolean
Ghost Drone will not stop
Minimum Alpha
Default = 0
Alpha when Ghost Drone stops

Individual Ghost Drone 101[]

6^x,y,Path,0,101,Direction^Acceleration,MaximumVelocity,AlwaysChase

When the Ninja is facing towards:
Chases the ninja
Kills on contact
Visible
When the Ninja is facing away:
Kills the Ninja on contact
Alpha visibility

Acceleration
Default = 0.02
Acceleration in pixels per frame
Maximum Velocity
Default = 2
Maximum speed
Always Chase
Boolean
Ghost Drone will not stop

Individual Ghost Drone 102[]

6^x,y,Path,0,102,Direction^Acceleration,MaximumVelocity,MinimumAlpha

When the Ninja is facing towards:
Chases the Ninja
Kills on contact
Alpha visibility
When the Ninja is facing away:
Will not interact with the Ninja
Visibile

Acceleration
Default = 0.02
Acceleration in pixels per frame
Maximum Velocity
Default = 2
Maximum speed
Minimum Alpha
Default = 0
Alpha when Ghost Drone stops

Individual Ghost Drone 103[]

6^x,y,Path,0,103,Direction^Acceleration,MaximumVelocity

When the Ninja is facing towards:
Chases the Ninja
Kills on contact
Visibile
When the Ninja is facing away:
Acts as a Rocky_Drone
Alpha visibility


Acceleration
Default = 0.02
Acceleration in pixels per frame
Maximum Velocity
Default = 2
Maximum speed

Rocky Drone[]

Object Number: 121

This drone is essentially a platform that moves like a drone.

6^x,y,path,0,121,direction^speed,chasespeed

Change number in bold to 1 to make the drone seeking.

These properties, as well as the additional properties for all objects, can be modified in the standard way:
speed
Default = 1;
r
Default = 9;

Tile Drone[]

Object Number: 122

This drone will place tiles behind it as it travels.

6^x,y,Path,0,122,direction^speed,chasespeed,tiles

Change number in bold to 1 to make the drone seeking.

Tiles is the text string for the tile pattern, it is just like the map data, the tile drone will loop through the string to lay the tiles. For example, if you use "NN10", the drone will place two 5-tiles, an E-tile, a space, and then repeat.

Alarm Drone[]

Object Number: 132

This drone will emit a circular laser going outwards when it sees the ninja. The ninja will die upon contact with the laser.

6^x,y,Path,0,132,direction^speed,chasespeed,laserMinRadius,laserMaxRadius,radiusUp,radiusDown,neverDown,alwaysMove

Change number in bold to 1 to make the drone seeking.

laserMinRadius, the min radius of the laser, default 30
laserMaxRadius, the max radius of the laser, default 400
radiusUp, the increase rate of the radius, default 1
radiusDown, the decrease rate of the radius, default 2
neverDown, if it is set to 1 then the laser will never decrease in size
alwaysMove, if it is set to 1 then the drone will move even when it sees you

Greedy Drone[]

Object Number: 141

This drone can steal or give time/gold to the ninja.

6^x,y,Path,0,141,direction^speed,chasespeed,collectcoin

Change number in bold to 1 to make the drone seeking

For collectcoin: value for stealing 1 second = -40 value for stealing 1 frame = -1 value for giving player 1 second = 40 This value must be an integer.

Text Drone[]

Text Drones settings are all configured individually

The Text Drone merely serves to add dialogue to the game.

6^x,y,Path,1,201,direction^textArray,xoffset,yoffset,align,border,textColor,backgroundColor,fontSize,font,bold,italic,underline

Apart from textArray, all other parameters are optional

textArray: escaped text characters joined by ":"
align: 0=left, 1=center, 2=right
border: 0=no border, 1=has border
textColor & backgroundColor: from 000000 to FFFFFF
font: sans, serif, typewriter, if you put other fonts, other players may not able to see it.
bold, italic, underline : 0 or 1

specialOn Trigger: Display next text in array
SpecialOff Trigger: Hiding the text

escape your text: http://n.infunity.com/swf/escape.swf

If you want to make the drone 'chase' the ninja, use AI Pathing Objects to chase the ninja. You can then ajust the x and y offset to your taste.

Note: Non english characters will not be able to be shown on all users computers.

Player Mods[]

The syntax for this slot is much like the syntax for the objectMod slot, except without the identifier number: property,modification;. Again, any number of these can be strung together.

Here is a list of all modifiable properties:

r
Default = 10
maxspeedAir
Default = 5; controls the maximum speed the ninja can accelerate up to in the air (the ninja can go faster if he is propelled by something else, though)
maxspeedGround
Default = 5; controls the maximum speed the ninja can accelerate up to on the ground
groundAccel
Default = 0.15; controls the ninja's acceleration on the ground
airAccel
Default = 0.1; controls the ninja's aerial acceleration
g
Default = 0.15; controls gravity until the first time the ninja jumps
d
Default = 0.99; controls air resistance until the first time the ninja jumps
normGrav
Default = 0.15; controls gravity after the ninja has jumped
normDrag
Default = 0.99; controls air resistance after the ninja has jumped
jumpGrav
Default = 0.025; controls gravity for a short time after the jump button is pressed for as long as it it held
max_jump_time
Default = 30; controls the maximum amount of time that jump gravity can apply to the ninja
winDrag
Default = 0.8; controls the speed the ninja experiences after he passes the activated exit door. Increase to make him move faster away from it, or set to "0" to stop moving completely
wallFriction
Default = 0.13; controls the friction the ninja experiences while wallsliding
skidFriction
Default = 0.92; controls the friction the ninja experiences while sliding to a stop (note: higher values mean less friction, and values above 1 cause the ninja to speed up)
standFriction
Default = 0.8; controls the friction the ninja experiences as he stops sliding entirely
jumpAmt
Default = 1; controls the strength with which the ninja pushes off from the floor/slopes/walls
jump_y_bias
Default = 2; controls the upwards motion (downwards if negative) the ninja experiences regardless of where he jumps from
terminal_vel
Default = 9; controls the speed at which hitting the ground becomes deadly
noWallJump
Default = 0; set to 1 to disable wall jump
noWallSlide
Default = 0; set to 1 to disable wall slide
maxJumpCount
Default = 1; set to 2 to enable double jump (i.e. you can jump in air), set to 3 to enable triple jump and so on, set to 0 to disable floor jump
jumpResetYSpeed
Default = 0; set to 1 to reset coordinate Y speed when jumping

Pathing[]

All objects except rocket launcher and floor guard can be applied for Drone's AI Pathing system on it.

AI Pathing Objects : append ^^^customPath,PathID,Direction,speed

Path ID:
SURFACE FOLLOW Clock Wise = 0;
SURFACE FOLLOW Counter Clock Wise = 1;
WANDER Clock Wise= 2;
WANDER Counter Clock Wise = 3;
WANDER ALTERNATING = 4;
WANDER RANDOM = 5;
Nreality CustomPath = 6;
Circular Movement = 7;
Coordinates Pathing = 8;
Chase AI = 9;
Chasing Pathing = 10;

Circular Pathing[]

Path ID 7: append the following to the drones/objects:
^^^,7,direction,speed,startAngle,Radius

This will use objects' original position as center; x,y

Chase Pathing[]

Path ID 10: append the following to the drones/objects:
^^^,10,direction,speed,chaseWhenSighted,chaseKeepUpdate

chaseWhenSighted: makes the object/drone chase the ninja only when the it sees the them.
chaseKeepUpdate: makes the drone/object keep updating the path when it sees the ninja

Coordinate Pathing[]

Path ID 8: append the following to the drones/objects:
^^^x1.y1:x2.y2:x3.y3:x4.y4,8,direction,speed

You can have as many x?.y? positions as you want.
When it moved to the last point it will move back to the first point.

Custom Path[]

Path ID 6: append the following to drones:
6^x,y,6,0,droneType,direction^^^customPath
Append the following to objects:
^^^custompath,6,0,speed

CustomPath is formed with U (up) D (down) L (left) R (right) and every letter represents a tile moved in that direction.

When the end of a custom path is reached, it loops back to the beginning of the custom path to do it all over again. If you need to stop an object from further loops, insert any letter other than U, D, L or R at the end (e.g: B). This will stop the drone moving after the first loop.

For example, using ^^^UR will make the drone zig-zag diagonally upwards. Because there is no stop letter, the drone will not stop, even when it reaches the edge of the map.

Triggers[]

Objects can be "triggered" on and off via special door switches. "Off" objects will simply stop moving and not detect the ninja player at all, but they still detect collision, so an "off" zap drone, for example, is still dangerous.

To add "Trigger" to a door switch, append
^startTriggers(if you are using more than one, separate with "."),stopTriggers(separated by ".") to the door switch object (which starts with 9^)

To make the object triggerable, append
^^waitForTrigger,startTriggers(separated by "."),stopTriggers(separated by ".")

waitForTrigger should be set to 1 when you don't want an object or drone moving right away. This is commonly confused with startTriggers.
startTriggers are the trigger(s) which start movement of the drone/object after using waitForTrigger.

Special Trigger[]

To add "Special Trigger" to a door switch, append
^startTriggersID(separated by "."),stopTriggersID(separated by "."),startSpecialTriggersID(separated by "."),stopSpecialTriggersID(separated by ".") to the door object.

To make the object special triggerable, append
^^waitForTrigger(boolean, 0 or 1),startTriggersID(separated by "."),stopTriggersID(separated by "."),startSpecialTriggersID(separated by "."),stopSpecialTriggersID(separated by ".")

zap drone -> specialOn -> seeker drone
seeker drone -> specialOff -> zap drone

rocky drone -> specialOn -> seeker rocky drone
seeker rocky drone -> specialOff -> rocky drone

greedy drone -> specialOn -> seeker greedy drone
seeker greedy drone -> specialOff -> greedy drone

rotating laser drone:
specialOn-> keep rotating
specialOff->stop rotating

oneway special off : make the one way disappear

oneway special on:
case 1: if the one way has disappeared, it will reappear
case 2: if the one way is not disappeared, then it will rotate 90 degrees

Area Trigger[]

Area Triggers allow objects to only respond when an object is in a certain area of the map. This can apply to everything regular triggers apply to, including AI chasing drone, laser and chaingun drone, and AI pathing on anything (this allows for some control over the ninja's movement, but it is not the same as activating/deactivating playerMods).

Placed after the playerMods, i.e. after six |'s
!objectnumber^x0.y0:x1.y1^startTriggersID,stopTriggersID,specialOnTriggersID,specialOffTriggersID
with multiple of the same type of triggerIDs being seperated by periods.

(x0,y0) and (x1,y1) form the rectangle area that triggers things, and the triggerIDs do the same thing as the door switch trigger.

You can make multiple area triggers by putting ; between two of the above.

You can find additional help on Area Triggers here!

Custom Icon[]

To set Custom Icons to objects, use ||||objectType,icon,xoffset^yoffset^url

Beware that in N, all the object icon sizes are scaled down by default, so the image you loaded will probably be scaled down too. You can set xscale,100 and yscale,100 to restore your image's default size. The eye movieclip of the drone will disappear if you change its icon.

Since the image loaded into the object will not auto center itself, you will probably need to set xoffset and yoffset to adjust the correct position of the image to the object.

Additional Properties[]

There are also some properties relating to an object's display that can be applied to anything. If the object can collide with the ninja, these may be able to modify its hitbox.

xscale controls an object's width. The input is a number of pixels, so setting this to 20 would make the object appear to be 20 pixels wide.
yscale is the same as xscale, except it applies to height.
r change the object size and hitbox(changes both width and the height).
alpha controls an objects transparency, and can be anything from 0 to 100, with 0 being invisible (This applies only to the door of locks, traps & exits, the switches are not effected by this. Projectiles & the Gauss Turret reticle are not effected by this).
color controls an object's color, and can modify red, green, and blue values for the object.
It can be set to a value in the format red%.redMod.green%.greenMod.blue%.blueMod.transparent%.transparentMod. The "%" values multiply that channel by the given percent (e.g., if blue% was 50, the object's blue hues would be half as intense). The "Mod" values add the given amount to that channel.

color can be used to make an object any color by:

  1. Finding the red, green, and blue values of your target color
  2. Setting color to 0.redValue.0.greenValue.0.blueValue.100.0

Note: this removes all texture from most objects.

Advertisement