Compare commits

...

22 Commits

Author SHA1 Message Date
OMGeeky
86b838f755 fix ordering of changed elements with optimized structure 2025-12-21 15:56:11 +01:00
Nut.andor
f66d016d08 fix spritesheet 2025-11-09 21:13:55 +01:00
Nut.andor
9ba45fe848 toList replaced by collect 2025-11-09 18:03:30 +01:00
Nut.andor
f14255ce1c new spritesheets 2025-11-09 16:36:40 +01:00
Nut.andor
c37b56988d sort problem 2025-10-26 02:49:44 +02:00
Nut.andor
9654da02c2 New requirement "skillIncrease" to check if a skill increase for n levels is possible 2025-10-26 02:49:44 +02:00
Nut.andor
d5c1ccebce Merge remote-tracking branch 'origin/master' 2025-10-04 02:13:01 +02:00
Nut.andor
0bf6b3f4d1 spriteFlipChance renamed to horizontalFlipChance to fit the engine 2025-10-04 01:22:11 +02:00
Nut
69c031d28e Merge pull request #16 from OMGeeky/fix-release-workflow
Fix release workflow
2025-10-03 16:30:13 +02:00
Nut.andor
6ec4cbf83d Merge branch 'pulls/1195352/15'
Miss effect added, add comments to start script
2025-10-03 15:56:10 +02:00
Nut.andor
5b2480920e Version 24 2025-10-03 15:53:37 +02:00
Nut.andor
e6f89b8802 Miss effect 2025-10-03 15:18:15 +02:00
Nut.andor
f2008de3e2 Merge branch 'pulls/1195352/13' 2025-10-03 15:15:35 +02:00
Nut.andor
0df961c8d3 forgotten parameter 2025-10-03 15:12:00 +02:00
Nut.andor
15b98eedcf Added field for Sprite Flip Chance 2025-10-03 14:59:04 +02:00
OMGeeky
8399ae60ee upload zip as soon as its ready and upload exe later 2025-10-02 17:40:00 +02:00
OMGeeky
1b643f4aa1 fix nsis arguments (from switching to linux) 2025-10-02 17:10:23 +02:00
OMGeeky
4293095e8e fix warning/error output in action 2025-10-02 17:09:08 +02:00
Nut.andor
c94c5fb41b Pull Request #15: Miss effect 2025-10-02 16:39:45 +02:00
Nut.andor
7df75482eb Pull Request #13: Added field for Sprite Flip Chance 2025-09-08 14:40:23 +02:00
Raphi
f93d865da7 Add spriteFlipChance as attribute in NPC.java 2025-09-04 21:41:27 +02:00
Raphi
bad86eec93 Add Sprite Flip Chance Field to NPCEditor.java 2025-09-04 21:29:04 +02:00
10 changed files with 60 additions and 26 deletions

View File

@@ -41,6 +41,14 @@ jobs:
ls -la common/ATCS.jar
ls -la ATCS_${{ env.VERSION }}.zip
- name: Upload Release Assets (zip)
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
./packaging/ATCS_${{ env.VERSION }}.zip
- name: 'Install makensis (apt)'
run: sudo apt update && sudo apt install -y nsis nsis-pluginapi
continue-on-error: true
@@ -49,24 +57,13 @@ jobs:
uses: joncloud/makensis-action@v4
with:
script-file: packaging/Windows/ATCS_Installer.nsi
arguments: /DVERSION="${{ env.VERSION }}"
arguments: -DVERSION="${{ env.VERSION }}"
continue-on-error: true
- name: Determine Upload Files
id: check_files_to_upload
shell: bash
run: |
FILES="./packaging/ATCS_${VERSION}.zip"
if [ -f "./packaging/ATCS_${VERSION}_Setup.exe" ]; then
FILES="$FILES ./packaging/ATCS_${VERSION}_Setup.exe"
else
run: echo "::warning::exe-installer created by NSIS was not found; only ZIP will be uploaded."
fi
echo "files=$FILES" >> $GITHUB_OUTPUT
- name: Upload Release Assets
- name: Upload Release Assets (exe)
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ steps.check_files_to_upload.outputs.files }}
files: ./packaging/ATCS_${{ env.VERSION }}_Setup.exe
continue-on-error: true

View File

@@ -1 +1 @@
v0.6.23
v0.6.24

View File

@@ -45,6 +45,7 @@ atcs.spritesheet.items_weapons.category=item
atcs.spritesheet.items_weapons_2.category=item
atcs.spritesheet.items_weapons_3.category=item
atcs.spritesheet.monsters_antison.category=monster
atcs.spritesheet.monsters_armor1.category=monster
atcs.spritesheet.monsters_arulirs.category=monster
@@ -132,3 +133,6 @@ atcs.spritesheet.monsters_newb_3.sizey=64
atcs.spritesheet.monsters_newb_4.category=monster
atcs.spritesheet.monsters_newb_4.sizex=32
atcs.spritesheet.monsters_newb_4.sizey=64
atcs.spritesheet.monsters_1x2.category=monster
atcs.spritesheet.monsters_1x2.sizex=32
atcs.spritesheet.monsters_1x2.sizey=64

View File

@@ -170,7 +170,7 @@ public class GameDataCategory<E extends JSONElement> implements ProjectTreeNode
@Override
public void notifyCreated() {
childrenAdded(new ArrayList<ProjectTreeNode>());
for (E node : dataMap.values()) {
for (E node : toList()) {
node.notifyCreated();
}
}
@@ -232,7 +232,7 @@ public class GameDataCategory<E extends JSONElement> implements ProjectTreeNode
return;
}
List<Map> dataToSave = new ArrayList<Map>();
for (E element : dataMap.values()) {
for (E element : toList()) {
if (element.jsonFile.equals(jsonFile)) {
dataToSave.add(element.toJson());
}

View File

@@ -13,9 +13,9 @@ import javax.swing.tree.TreeNode;
import java.awt.*;
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.*;
import java.util.List;
import java.util.stream.Collectors;
public class GameDataSet implements ProjectTreeNode, Serializable {
@@ -159,7 +159,9 @@ public class GameDataSet implements ProjectTreeNode, Serializable {
}
} else if (parent.type != GameSource.Type.referenced) {
for (File f : baseFolder.listFiles()) {
List<File> files = new ArrayList<File>(Arrays.stream(baseFolder.listFiles()).collect(Collectors.toList()));
Collections.sort(files,Comparator.comparing(x->x.getName()));
for (File f : files) {
if (f.getName().startsWith("actorconditions_")) {
ActorCondition.fromJson(f, actorConditions);
} else if (f.getName().startsWith("conversationlist_")) {

View File

@@ -38,6 +38,7 @@ public class NPC extends JSONElement {
public Integer attack_damage_min = null;
public String spawngroup_id = null;
public String faction_id = null;
public Integer horizontalFlipChance = null;
public String dialogue_id = null;
public String droplist_id = null;
public Integer attack_cost = null;
@@ -155,6 +156,7 @@ public class NPC extends JSONElement {
}
this.spawngroup_id = (String) npcJson.get("spawnGroup");
this.faction_id = (String) npcJson.get("faction");
this.horizontalFlipChance = JSONElement.getInteger((Number) npcJson.get("horizontalFlipChance"));
this.dialogue_id = (String) npcJson.get("phraseID");
this.droplist_id = (String) npcJson.get("droplistID");
this.attack_cost = JSONElement.getInteger((Number) npcJson.get("attackCost"));
@@ -244,6 +246,7 @@ public class NPC extends JSONElement {
}
clone.droplist_id = this.droplist_id;
clone.faction_id = this.faction_id;
clone.horizontalFlipChance = this.horizontalFlipChance;
if (this.hit_effect != null) {
clone.hit_effect = new HitEffect();
copyHitEffectValues(clone.hit_effect, this.hit_effect, clone);
@@ -302,6 +305,7 @@ public class NPC extends JSONElement {
writeMinMaxToMap(npcJson, "attackDamage", this.attack_damage_min, attack_damage_max, 0);
if (this.spawngroup_id != null) npcJson.put("spawnGroup", this.spawngroup_id);
if (this.faction_id != null) npcJson.put("faction", this.faction_id);
if (this.horizontalFlipChance != null) npcJson.put("horizontalFlipChance", this.horizontalFlipChance);
if (this.dialogue != null) {
npcJson.put("phraseID", this.dialogue.id);
} else if (this.dialogue_id != null) {

View File

@@ -64,7 +64,8 @@ public class Requirement extends JSONElement {
date,
dateEquals,
time,
timeEquals
timeEquals,
skillIncrease
}
public enum SkillID {
@@ -166,6 +167,7 @@ public class Requirement extends JSONElement {
case dateEquals:
case time:
case timeEquals:
case skillIncrease:
break;
}
if (this.required_obj != null) this.required_obj.addBacklink((GameDataElement) this.parent);

View File

@@ -610,6 +610,17 @@ public class DialogueEditor extends JSONElementEditor {
requirementObjId = addTextField(pane, "Time type HHMMSS:", requirement.required_obj_id, writable, listener);
requirementValue = addIntegerField(pane, "Exact time value: ", requirement.required_value, true, writable, listener);
break;
case skillIncrease:
skillId = null;
try {
skillId = requirement.required_obj_id == null ? null : Requirement.SkillID.valueOf(requirement.required_obj_id);
} catch (IllegalArgumentException e) {
}
requirementObj = null;
requirementSkill = addEnumValueBox(pane, "Skill ID:", Requirement.SkillID.values(), skillId, writable, listener);
requirementObjId = null;//addTextField(pane, "Skill ID:", requirement.required_obj_id, writable, listener);
requirementValue = addIntegerField(pane, "Level up: ", requirement.required_value, false, writable, listener);
break;
}
requirementNegated = addBooleanBasedCheckBox(pane, "Negate this requirement.", requirement.negated, writable, listener);
}
@@ -843,7 +854,7 @@ public class DialogueEditor extends JSONElementEditor {
if (req.required_obj.getIcon() != null) {
label.setIcon(new ImageIcon(req.required_obj.getIcon()));
}
} else if (req.type == Requirement.RequirementType.skillLevel) {
} else if (req.type == Requirement.RequirementType.skillLevel || req.type == Requirement.RequirementType.skillIncrease) {
label.setIcon(new ImageIcon(DefaultIcons.getSkillIcon()));
} else if (req.type == Requirement.RequirementType.spentGold) {
label.setIcon(new ImageIcon(DefaultIcons.getGoldIcon()));
@@ -1008,7 +1019,7 @@ public class DialogueEditor extends JSONElementEditor {
selectedRequirement.required_obj.removeBacklink(dialogue);
selectedRequirement.required_obj = null;
}
if (selectedRequirement.type == Requirement.RequirementType.skillLevel) {
if (selectedRequirement.type == Requirement.RequirementType.skillLevel || selectedRequirement.type == Requirement.RequirementType.skillIncrease) {
selectedRequirement.required_obj_id = value == null ? null : value.toString();
}
requirementsListModel.itemChanged(selectedRequirement);

View File

@@ -37,6 +37,7 @@ public class NPCEditor extends JSONElementEditor {
private JTextField nameField;
private JTextField spawnGroupField;
private JTextField factionField;
private JSpinner horizontalFlipChanceField;
private JSpinner experienceField;
private MyComboBox dialogueBox;
private MyComboBox droplistBox;
@@ -128,6 +129,7 @@ public class NPCEditor extends JSONElementEditor {
nameField = addTranslatableTextField(pane, "Display name: ", npc.name, npc.writable, listener);
spawnGroupField = addTextField(pane, "Spawn group ID: ", npc.spawngroup_id, npc.writable, listener);
factionField = addTextField(pane, "Faction ID: ", npc.faction_id, npc.writable, listener);
horizontalFlipChanceField = addIntegerField(pane, "Horizontal flip chance: ", npc.horizontalFlipChance, false, npc.writable, listener);
experienceField = addIntegerField(pane, "Experience reward: ", npc.getMonsterExperience(), false, false, listener);
dialogueBox = addDialogueBox(pane, npc.getProject(), "Initial phrase: ", npc.dialogue, npc.writable, listener);
droplistBox = addDroplistBox(pane, npc.getProject(), "Droplist / Shop inventory: ", npc.droplist, npc.writable, listener);
@@ -205,6 +207,8 @@ public class NPCEditor extends JSONElementEditor {
npc.spawngroup_id = (String) value;
} else if (source == factionField) {
npc.faction_id = (String) value;
} else if (source == horizontalFlipChanceField) {
npc.horizontalFlipChance = (Integer) value;
} else if (source == dialogueBox) {
if (npc.dialogue != null) {
npc.dialogue.removeBacklink(npc);

View File

@@ -674,6 +674,16 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
requirementObjId = addTextField(pane, "Time type HHMMSS:", requirement.required_obj_id, writable, listener);
requirementValue = addIntegerField(pane, "Exact time value: ", requirement.required_value, true, writable, listener);
break;
case skillIncrease:
skillId = null;
try {
skillId = requirement.required_obj_id == null ? null : Requirement.SkillID.valueOf(requirement.required_obj_id);
} catch (IllegalArgumentException e) {
}
requirementObj = addEnumValueBox(pane, "Skill ID:", Requirement.SkillID.values(), skillId, writable, listener);
requirementObjId = null;//addTextField(pane, "Skill ID:", requirement.required_obj_id, writable, listener);
requirementValue = addIntegerField(pane, "Level: ", requirement.required_value, false, writable, listener);
break;
}
}
requirementNegated = addBooleanBasedCheckBox(pane, "Negate this requirement.", requirement.negated, writable, listener);
@@ -1921,7 +1931,7 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
} else if (source == requirementObj) {
if (selectedMapObject instanceof KeyArea) {
KeyArea area = (KeyArea) selectedMapObject;
if (area.requirement.type == Requirement.RequirementType.skillLevel) {
if (area.requirement.type == Requirement.RequirementType.skillLevel || area.requirement.type == Requirement.RequirementType.skillIncrease) {
area.requirement.required_obj_id = value == null ? null : value.toString();
} else {
area.requirement.required_obj = (GameDataElement) value;
@@ -1938,7 +1948,7 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
}
} else if (selectedMapObject instanceof ReplaceArea) {
ReplaceArea area = (ReplaceArea) selectedMapObject;
if (area.requirement.type == Requirement.RequirementType.skillLevel) {
if (area.requirement.type == Requirement.RequirementType.skillLevel || area.requirement.type == Requirement.RequirementType.skillIncrease) {
area.requirement.required_obj_id = value == null ? null : value.toString();
} else {
area.requirement.required_obj = (GameDataElement) value;