Scape Editor - Is a cache editor for the pre-400 era before the major "engine overhaul"
Latest Release:3.0.0
Scape Editor is a cache editor developed to be easy-to-use and fix problems in the 317 community. Scape Editor is a complete rewrite of my previous tool rsam found here. Scape Editor is highly extensible in which you can create plugins to read your own formats.
Modify texture properties (resizeWidth, resizeHeight and encodingType)
Search textures
Spoiler for 317 Sprite Editor:
Features
Pack sprites into 317 cache
Change sprite properties such as (offsetX, offsetY, and encodingType)
Export sprites
Create new image archives
Remove image archives
Add/Remove/Replace sprites
Search an image archive by its name
Has validation so you can't corrupt your cache (Will prevent you from adding sprites if the sprites you're trying to add have too many colors or the image archive exceeds color capacity)
Spoiler for 317 Interface Editor:
Features
Only renders type sprite, dialog, text, rectangles, and containers. Does not currently render... models, item list, inventory, scrollbar, or content types.
You can navigate to all interfaces packed into your cache
You can click on child interfaces and a yellow border will popup that shows you where the component is located on the container interface.
You can also view the properties of all interfaces
Only shows interfaces that are packed into your cache.
Does not support custom sprites.
It's fairly simple so there's still a lot of features to come.
Spoiler for 317/OSRS Model Viewer:
Z-buffering
Shading
Wireframes
Supports OSRS and 317 models
Pitch, yaw, roll, scale, translate transforms
Shows colors on models
View vertices
Move around model using mouse
Scale model
Add files from a directory or by selecting the files you want (Either gzipped or not)
Spoiler for Store/Index Editor:
Features
Add/Remove/Replace files
Create/Remove indexes
Export files
Search stores/indexes
Search files
Spoiler for 317 Archive Editor:
Features
Add/Remove/Replace/Export archive entries
Create/Remove/Export archives
Name archives
Identify hashes
Search archives
Search archive entries
Spoiler for Npc Definition Editor:
Features
Read any format (as long as you have a plugin that can read it)
Search definitions
View all properties
Spoiler for Item Definition Editor:
Features
Read any format (as long as you have a plugin that can read it)
Search definitions
View all properties
Spoiler for Object Definition Editor:
Features
Read any format (as long as you have a plugin that can read it)
Search definitions
View all properties
Spoiler for Older media:
Viewing configs
Packing configs
Scape Editor - Packing Models, Animations, Music and Maps
Scape Editor - Creating New Indexes
Scape Editor - Renaming File Stores
Scape Editor - Identifying hashes
Spoiler for How to create a Config Plugin:
1. Create a new project
2. Add scape-editor.jar as a library to that project
3. Define a class like this
Code:
package plugin;
import scape.editor.api.io.RSBuffer;
import scape.editor.gui.plugin.Plugin;
import scape.editor.gui.plugin.extension.config.NpcDefinitionExtension;
@Plugin(name="OSDC Npc Definition Plugin", authors = "Nshusa", version = 1.0)
public class NpcDefinitionPlugin extends NpcDefinitionExtension {
@Override
protected String fileName() {
return "npc.dat";
}
@Override
protected void decode(int currentIndex, RSBuffer buffer) {
id = currentIndex;
while(true) {
int opcode = buffer.readUByte();
if (opcode == 0) {
return;
} else if (opcode == 1) {
int len = buffer.readUByte();
modelId = new int[len];
for (int i = 0; i < len; i++) {
modelId[i] = buffer.readUShort();
}
} else if (opcode == 2) {
name = buffer.readString();
} else if (opcode == 12) {
size = buffer.readUByte();
} else if (opcode == 13) {
standingAnimation = buffer.readUShort();
} else if (opcode == 14) {
walkingAnimation = buffer.readUShort();
} else if (opcode == 15) {
buffer.readUShort();
} else if (opcode == 16) {
buffer.readUShort();
} else if (opcode == 17) {
walkingAnimation = buffer.readUShort();
halfTurnAnimation = buffer.readUShort();
quarterClockwiseTurnAnimation = buffer.readUShort();
quarterAnticlockwiseTurnAnimation = buffer.readUShort();
if (halfTurnAnimation == 65535) {
halfTurnAnimation = walkingAnimation;
}
if (quarterClockwiseTurnAnimation == 65535) {
quarterClockwiseTurnAnimation = walkingAnimation;
}
if (quarterAnticlockwiseTurnAnimation == 65535) {
quarterAnticlockwiseTurnAnimation = walkingAnimation;
}
} else if (opcode >= 30 && opcode < 35) {
if (actions == null) {
actions = new String[5];
}
actions[opcode - 30] = buffer.readString();
if (actions[opcode - 30].equalsIgnoreCase("Hidden")) {
actions[opcode - 30] = null;
}
} else if (opcode == 40) {
int len = buffer.readUByte();
recolorOriginal = new int[len];
recolorTarget = new int[len];
for (int i = 0; i < len; i++) {
recolorOriginal[i] = buffer.readUShort();
recolorTarget[i] = buffer.readUShort();
}
} else if (opcode == 41) {
int len = buffer.readUByte();
for (int i = 0; i < len; i++) {
buffer.readUShort(); // textures
buffer.readUShort();
}
} else if (opcode == 60) {
int len = buffer.readUByte();
additionalModels = new int[len];
for (int i = 0; i < len; i++) {
additionalModels[i] = buffer.readUShort();
}
} else if (opcode == 93) {
aBoolean87 = false;
} else if (opcode == 95)
combatLevel = buffer.readUShort();
else if (opcode == 97)
scaleXZ = buffer.readUShort();
else if (opcode == 98)
scaleY = buffer.readUShort();
else if (opcode == 99)
aBoolean93 = true;
else if (opcode == 100)
lightModifier = buffer.readByte();
else if (opcode == 101)
shadowModifier = buffer.readByte();
else if (opcode == 102)
headIcon = buffer.readUShort();
else if (opcode == 103)
rotation = buffer.readUShort();
else if (opcode == 106 || opcode == 118) {
varbit = buffer.readUShort();
if (varbit == 65535) {
varbit = -1;
}
varp = buffer.readUShort();
if (varp == 65535) {
varp = -1;
}
int value = -1;
if (opcode == 118) {
value = buffer.readUShort();
}
int len = buffer.readUByte();
morphisms = new int[len + 2];
for (int i = 0; i <= len; i++) {
morphisms[i] = buffer.readUShort();
if (morphisms[i] == 65535) {
morphisms[i] = -1;
}
}
morphisms[len + 1] = value;
} else if (opcode == 109) {
aBoolean84 = false;
} else if (opcode == 107 || opcode == 111) {
} else {
System.out.println(String.format("npc def invalid opcode: %d", opcode));
}
}
}
public int id = -1;
public int quarterAnticlockwiseTurnAnimation = -1;
public int varbit = -1;
public int halfTurnAnimation = -1;
public int varp = -1;
public int combatLevel = -1;
public final int anInt64 = 1834;
public String name;
public String actions[];
public int walkingAnimation = -1;
public int size = 1;
public int[] recolorTarget;
public int[] additionalModels;
public int headIcon = -1;
public int[] recolorOriginal;
public int standingAnimation = -1;
public long interfaceType = -1L;
public int rotation = 32;
public int quarterClockwiseTurnAnimation = -1;
public boolean aBoolean84 = true;
public int lightModifier;
public int scaleY = 128;
public boolean aBoolean87 = true;
public int morphisms[];
public int scaleXZ = 128;
public int shadowModifier;
public boolean aBoolean93;
public int[] modelId;
public int interfaceZoom = 0;
}
4. Export this project as a jar and add it to the folder at user.home/Scape-Editor/Plugins
5. That's it! It's that simple. Now just run scape-editor.jar and you can view your configs!
Last edited by CrazyPanda; 03-09-2019 at 03:29 AM.
Reason: title change
Because it's for a 317 cache and ruse is a 317 cache the only thing you may have to do is rename it from "ruse.idx" to "main_file_cache" since ruse renames the cache different for some stupid but it is ruse lol or you coudl edit the code you get to auto load it using the ruse name and ive just double checked for you it works