Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Making my own Editor


Dark_Marine_123
 Share

Recommended Posts

So Ive come across a dilemma trying to create my own editor. I feel I have enough experience, learning how to handle and send packets as well as modify data and the likes from the various .bin files and the like, I wanted to make an editor for the rest of my devs so they could work in their own NPCs for my Turn Based Combat system.

The problem? I have no idea HOW you populate the editor with information from the server. Im going through everything, I had assumed it might look something like While i < MAX_NPCS Npc(i).name = blah or something, but that search turned up no luck for me. Can anyone point me in the right direction?
Link to comment
Share on other sites

To populate text boxes labels and all that good stuff

```

controlName.text = rec(editorindex).name

```
Add that. And also remeber to edit that code. To populate the index list at the left of editors

```

for i = 1 to max_random

List.add = rec(i).name

next

```
Again u will have to edit that code. (Esp. the list.add) Typed it out of memory.
Link to comment
Share on other sites

The way it works is that data is initially sent from the server to the client, which saves the data in the NPC array. You'll want to look in the modGameEditors to understand how it populates the data in the form, from the NPC array. A general, and very brief explanation is that if you look at sub NPCEditorInit, this is where it starts the NPC editor, where it populates the list box with the lists of NPCs and handles the initial part of the editor. If you look at the source behind the NPC editor form itself, this is where you'll notice when the user clicks the list of NPCs, it flags this list index as a variable and then populates the text boxes according to the NPC (listindex) array. When it's all done, it there is the save function which then returns the entire NPC array back to the server to be saved and send it out to every other connected client.
Link to comment
Share on other sites

After staring at the code for another hour and with some help here, I think I got the gist of it. Im going to just actually edit the NPC editor first through before I actually dive into making my own editor. Ill need to figure that out later when I add my prefix suffix system, which after looking at all this stuff, looks pretty easy to do now.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...