Page 9 of 37

Re: Andor's Trail Content Studio [ATCS] - Win/Mac/Linux Content Editor

Posted: Mon Jan 04, 2016 4:11 pm
by twirlimp
Zukero wrote:
twirlimp wrote: Amazing tool you did there.

I added a few new JSON fields and was wondering how difficult it would be to make them appear in the ATCS gui.
(I don't mind adding them myself if you're busy, since I'm going to help with ATCS eventually)
Thanks, glad you like it.
It shouldn't be difficult to add, but I won't do it in the "official" ATCS until this data is used by the current game code.

In order to code it yourself in a fork, you should look to this places:
- In class com.gpl.rpg.atcontentstudio.model.gamedata.NPC, especially methods parse(Map npcJson) and toJson()
- In class com.gpl.rpg.atcontentstudio.ui.gamedataeditors.NPCEditor, especially methods insertFormViewDataField(JPanel pane) and NPCFieldUpdate.valueChanged(JComponent source, Object value)

As it is an "enum" type of data, you can find inspiration with the Monster Class or Movement Type fields.
Oh they're already read from JSON files by the monster and item parsers when using the optxxx() methods to pass to monster/item constructors.

They new weapon range property is even shown in the item info in inventory. :)

Re: Andor's Trail Content Studio [ATCS] - Win/Mac/Linux Content Editor

Posted: Mon Jan 04, 2016 4:34 pm
by Zukero
The classes I mentioned are in ATCS, not AT ;)

Re: Andor's Trail Content Studio [ATCS] - Win/Mac/Linux Content Editor

Posted: Mon Jan 04, 2016 5:12 pm
by twirlimp
Zukero wrote:The classes I mentioned are in ATCS, not AT ;)
Oh ok XD
That makes a lot more sense.

Anyway I'm just testing for any bugs although I haven't found any today.
I added some combat messages for when "target out of range", and also some messages when aiming outside combat.

I'm going to send you a PM with the rest of this post because it got way out of topic for this thread. :P

Edit: Wow it took me a almost an hour to list my thoughts in the clearest way I can.

Re: Andor's Trail Content Studio [ATCS] - Win/Mac/Linux Content Editor

Posted: Tue Jan 05, 2016 3:50 pm
by Zukero
v0.4.4 released !

At project creation, a new option allows to take advantage of the loadresources.xml or loadresources_debug.xml files. These files are used by the game to define what .json and .tmx files to load, in either normal mode or debug mode respectively. This can really help to have a more realistic view of the actually-used game content, and prevent issues that can arise from ID collision between real game data and debug data (notably, the startitems droplist).
The "All Files" mode works just like before, by searching for all files that are correctly placed and named.

Sadly, to take advantage of this, you MUST create new projects, as old projects default to the last mode: All Files.

Migrating an old project to the new mode is possible, through some manual work:
  • Use your file explorer to browse to your ATCS workspace
  • Copy your old project's folder somewhere else (outside your workspace)
  • Open ATCS, delete your old (backed up) project.
  • Create a new project, selecting the desired resource set, and give it the same name as your old project.
  • Close ATCS
  • From your backed up folder, copy the "created" and "altered" folders, and paste them in your new project's folder in your workspace.
  • Relaunch ATCS, and check that everything is correct. Otherwise, report your issues here.
There's also a small tweak to the spritesheet editor layout, so that you can see the whole sprite in the grid view, as around 1px right and down were cropped before.

Finally, and that's for rijackson741, the NPCs and Items comparators include both the altered and original versions of the elements when an altered version exists. That makes it able to list ALL instances of each.

Re: Andor's Trail Content Studio [ATCS] - Win/Mac/Linux Content Editor

Posted: Wed Jan 06, 2016 9:05 pm
by rijackson741
Zukero wrote:Finally, and that's for rijackson741, the NPCs and Items comparators include both the altered and original versions of the elements when an altered version exists. That makes it able to list ALL instances of each.
Thanks :D . Seems to work well.

Re: Andor's Trail Content Studio [ATCS] - Win/Mac/Linux Content Editor

Posted: Wed Jul 13, 2016 2:41 am
by nurjuzut
Can someone help me get started with the ATCS?
When I am trying to create a project I select the source code I downloaded from https://github.com/Zukero/ATCS but no matter what I try I get the error The selected AT source root folder does not contain the "res" folder.

Re: Andor's Trail Content Studio [ATCS] - Win/Mac/Linux Content Editor

Posted: Wed Jul 13, 2016 5:26 am
by Zukero
Yeah, that's because you need the sources of Andor's Trail, not ATCS.
The code is at https://github.com/Zukero/andors-trail
and you'll need to point ATCS to the AndorsTrail subdirectory.

Re: Andor's Trail Content Studio [ATCS] - Win/Mac/Linux Content Editor

Posted: Wed Jul 20, 2016 12:15 pm
by Zukero
v0.4.5 released !

Not much, except bug fixes, and adaptation to changes I made in the AT code. I'll do a thread about it, and link to it here.

As a complement, I used the Beanshell console to do some cool stuff, and wanted to share the scripts, so ou have more example of what can be achieved with it:


QUEST COMPLETION TEST

Code: Select all

import com.gpl.rpg.atcontentstudio.model.Workspace;

proj = Workspace.activeWorkspace.projects.get(0);

for(quest : proj.baseContent.gameData.quests) {
	print(quest.id+"\t--> "+quest.name);
	completing_stages_count = 0;
	for (stage : quest.stages) {
		if (stage.finishes_quest != null && stage.finishes_quest != 0) {
			completing_stages_count++;
		}
	}
	if (completing_stages_count == 0) {
		print("ALERT: Impossible to finish this quest");
	} else if (completing_stages_count == 1) {
		print("\tThere is 1 way to complete this quest");	
	} else {
		print("\tThere are "+completing_stages_count+" ways to complete this quest");	
	}
	print("");
}
SEARCH IN DIALOGUES AND REPLIES

Code: Select all

import com.gpl.rpg.atcontentstudio.*;
import com.gpl.rpg.atcontentstudio.model.*;
import com.gpl.rpg.atcontentstudio.model.gamedata.*;


proj = Workspace.activeWorkspace.projects.get(1);

String searched = "my brother";

int repl_count = 0;
int dial_count = 0;

for (int i = 0; i < proj.getDialogueCount(); i++) {
	Dialogue dial = proj.getDialogue(i);
	if (dial == null  || dial.message == null) continue;
	if (dial.replies == null || dial.replies.isEmpty()) continue;
	Dialogue.Reply reply;
	for (reply : dial.replies) {
		if (reply.text == null) continue;
		if (reply.text.indexOf(searched) > 0) {
			repl_count++;
			print("-----Match in reply-------");
			print(dial.id);
			print("- "+dial.message);
			print("- "+reply.text);
			if (reply.next_phrase != null && reply.next_phrase.message != null) {
				print("- "+reply.next_phrase.message);
			}
		}	
	}
	if (dial.message.indexOf(searched) > 0) {
		dial_count++;
		print("-----Match in dialogue ----");
			print(dial.id);
			print("- "+dial.message);
	}
}

print ("-------------------------");
print (dial_count+" match(es) in dialogues");
print (repl_count+" match(es) in replies");
print ("-------------------------");
SEARCH IN MAP NAMES

Code: Select all

import com.gpl.rpg.atcontentstudio.*;
import com.gpl.rpg.atcontentstudio.model.*;
import com.gpl.rpg.atcontentstudio.model.gamedata.*;
import com.gpl.rpg.atcontentstudio.model.maps.*;


proj = Workspace.activeWorkspace.projects.get(1);

String searched = "church";

int repl_count = 0;

for (int i = 0; i < proj.getMapCount(); i++) {
	TMXMap map = proj.getMap(i);
	if (map == null  || map.id == null) continue;
	if (map.id.indexOf(searched) > 0) {
			repl_count++;
			print(map.id);
	}
	
}

print ("-------------------------");
print (repl_count+" match(es)");
print ("-------------------------");
SPAWN AREAS WITH DUPLICATE IDS

Code: Select all

import com.gpl.rpg.atcontentstudio.*;
import com.gpl.rpg.atcontentstudio.model.*;
import com.gpl.rpg.atcontentstudio.model.gamedata.*;
import com.gpl.rpg.atcontentstudio.model.maps.*;
import java.util.List;
import java.util.LinkedList;


proj = Workspace.activeWorkspace.projects.get(1);

int repl_count = 0;

for (int i = 0; i < proj.getMapCount(); i++) {
	TMXMap map = proj.getMap(i);
	if (map == null  || map.groups == null) continue;
	List spawnAreaNames = new LinkedList();
	for(MapObjectGroup group : map.groups) {
		if (group.mapObjects == null || group.mapObjects.isEmpty()) continue;
		for (MapObject obj : group.mapObjects) {
			if (!(obj instanceof SpawnArea)) continue;
			if (spawnAreaNames.contains(obj.name)) {
				print(map.id+" -> "+obj.name);
			} else {
				spawnAreaNames.add(obj.name);
			}
		}
	}
	
}
REMOVE DUPLICATE IDS IN SPAWN AREAS

Code: Select all

import com.gpl.rpg.atcontentstudio.*;
import com.gpl.rpg.atcontentstudio.model.*;
import com.gpl.rpg.atcontentstudio.model.gamedata.*;
import com.gpl.rpg.atcontentstudio.model.maps.*;
import java.util.Map;
import java.util.LinkedHashMap;
import java.io.File;
import java.io.FileWriter;


proj = Workspace.activeWorkspace.projects.get(1);

int repl_count = 0;

for (int i = 0; i < proj.getMapCount(); i++) {
	TMXMap map = proj.getMap(i);
	if (map == null  || map.groups == null) continue;
	Map spawnAreaNames = new LinkedHashMap();
	boolean dupl = false;
	for(MapObjectGroup group : map.groups) {
		if (group.mapObjects == null || group.mapObjects.isEmpty()) continue;
		for (MapObject obj : group.mapObjects) {
			if (!(obj instanceof SpawnArea)) continue;
			if (spawnAreaNames.containsKey(obj.name)) {
				int index = ((Integer)spawnAreaNames.get(obj.name)) + 1;
				spawnAreaNames.put(obj.name,index);
				obj.name = obj.name+"_"+index;
				print(map.id+" -> "+obj.name);
				dupl = true;
			} else {
				spawnAreaNames.put(obj.name,0);
			}
		}
	}
	if (dupl) {
		File tmxFile = new File("/tmp/maps/"+map.id+".tmx");
		FileWriter w = new FileWriter(tmxFile);
		w.write(map.toXml());
		w.close();
	}
}

Re: Andor's Trail Content Studio [ATCS] - Win/Mac/Linux Content Editor

Posted: Fri Jul 22, 2016 7:50 am
by Zukero
v0.4.6 released.
Again, not much except bugfixes. A lot of bugfixes. So many bugfixes it was worth doing a release.

Re: Andor's Trail Content Studio [ATCS] - Win/Mac/Linux Content Editor

Posted: Sat Jul 23, 2016 5:11 pm
by Ian
Nice Kevin! Keep up your great work!