Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

And then comes 1.7 xD

a modder's job is never done it seems

Communication is a vital tool, in the game industry you won't go anywhere without it. People are either going to learn to talk, or move on.

  • Author

Hey, things continue roll on. Got the first testable version with added worldgen, that is dungeons. Also as a nice addition, we are joing forces with hydroflame, where we'll combine my singleplayer design with his multilplayer server features. Being also more experienced with forge and graphics programming im happy to have him aboard.

 

This is probably the last release containing just my stuff, mainly an update to 1.6.4 and some worldgen addition:

0.4.0

- Update to 1.6.4

- Added dungeon world structure generator

  • 2 weeks later...

Very cool dungeon setup!  How randomized will the dungeons be, if at all?  Will it be easy for mod veterans to find their way around them?

 

Glad to hear you brought another person aboard!  If and when you guys accomplish your vision, I am certain this mod will put your names out there quite a lot!  Good luck!  I'll be watching. >.>

  • Author

Made some fixes to the worldgen, this version should fix possible crashes. Also made further progress and has some very first implementation of scriptable dungeons.

 

0.4.1

  • Author

0.4.2

- Fixed lots of worldgen crashes.

 

Our test server currently has some login issues, you have to basically keep on loggin in and eventually it succeeds.

I dont think its the mod, rather the numerous crashes maybe corrupted the world file... I could be wrong though.

  • Author

More bugfixes and improvements to quest/structure system 0.4.3

 

Maybe its time for a bit more explanation how it works.

 

First of all, when the game is launched with the mod it will extract (if not already done) an folder structure inside the mods folder, containing the scripts.

Right now there is just one script that is being loaded (quests/dungeon/specialitem.js) but later it will be expanded to accept any number of scripts.

 

This script will define how the dungeon is generated. It offers a possibility of extremely random to completely static layout.

In addition to that there can be any number of json files (the mod ships with two predefines) serving as descriptors for that script, and those will define the content of the generated structure.

 

So eventually the user can add any number of scripts and any number of descriptors for each script.

 

So what will happen during the world generation phase is that a location is selected for the structure, then a random script is selected that forms the structure, then a random descriptor is selected for that script for the content. The content in this case means main loot, random loot, and later mobs, boss mobs, traps and books.

 

How the script uses the descriptor is entirely up to the script so anyone with enough programming experience can go quite far in modifying it, those with less experience can settle with modifying only the json files.

 

When playing on a server only the server files are used and the client scripts dont have to match at all. So server admins can set up interesting locations for the players. Well, eventually, right now the locations are still completely random.

 

Here is the current version of the specialitem.js:

 

 

 

 

importPackage(Packages.qadom.quests.structure.dungeon);

importClass(Packages.qadom.quests.structure.dungeon.QuestDungeon);

importClass(Packages.qadom.quests.structure.dungeon.QuestDungeonSpecialItem);

importPackage(Packages.qadom.quests.structure.dungeon.script);

importClass(Packages.qadom.quests.structure.dungeon.script.DungeonProvider);

 

importPackage(Packages.qadom.loot);

importClass(Packages.qadom.loot.LootManager);

 

importPackage(Packages.net.minecraft.item);

importClass(Packages.net.minecraft.item.Item);

importClass(Packages.net.minecraft.item.ItemStack);

 

importPackage(Packages.net.minecraft.enchantment);

importClass(Packages.net.minecraft.enchantment.Enchantment);

 

importPackage(Packages.net.minecraft.util);

importClass(Packages.net.minecraft.util.WeightedRandomChestContent);

 

// available dungeon nodes

importClass(Packages.qadom.quests.structure.dungeon.script.DungeonNode);

importClass(Packages.qadom.quests.structure.dungeon.script.DungeonCorridor);

importClass(Packages.qadom.quests.structure.dungeon.script.DungeonRoom);

importClass(Packages.qadom.quests.structure.dungeon.script.DungeonWall);

importClass(Packages.qadom.quests.structure.dungeon.script.DungeonTreasureRoom);

importClass(Packages.qadom.quests.structure.dungeon.script.DungeonTrapRoom);

importClass(Packages.qadom.quests.structure.dungeon.script.DungeonTrapCorridor);

importClass(Packages.qadom.quests.structure.dungeon.script.DungeonMonsterRoom);

importClass(Packages.qadom.quests.structure.dungeon.script.DungeonBossRoom);

 

 

////////////////////////////////////////////////////////////////

// this is called only once when the script is loaded

// initialize here anything extra you need

// scope:

////////////////////////////////////////////////////////////////

this.initialize = function() {

 

};

 

 

////////////////////////////////////////////////////////////////

// called when player causes a quest update tick

// most relevant information pertaining to the player character and quest progress is in the instance object

// scope: random, scriptObject, instance, player

////////////////////////////////////////////////////////////////

this.update = function() {

 

};

 

////////////////////////////////////////////////////////////////

// creates dungeon blueprint

// scope: random, scriptObject, descriptorData

////////////////////////////////////////////////////////////////

function createDungeonProvider() {

 

var descriptor = JSON.parse(descriptorData);

var provider = new DungeonProvider();

 

//////////////////////////////////////////////////////////////////

// Arguments for DungeonNode constructors are:

//

// random: needed, just pass it

// level: dungeon level index, 0 is bottom

// leveldepth: sets the depth withing the level

// width: component width

// height: component height

// length: component length

// condition: condition, 0 - 100, lower condition results in more cracked/broken blocks

// coordMode: 0-3 are the main coord modes, -1 picks a random from 0-3, -2 means 'in place' and centers on parent

// autoExpand: sets if this component will automatically build children

// toNextLevel: sets if this component is responsible of carrying the 'start next level' condition, will pass it to a child if expanding, else will start next level

//////////////////////////////////////////////////////////////////

 

 

// create dungeon start, a treasure room, -- note the additional argument 'scriptObject', which is important fir the start node

var startNode = new DungeonTreasureRoom(scriptObject, random, 0, 0, 12, 8, 12, 95, 0, true, true);

 

if (descriptor.item != null) {

var item = descriptor.item;

var name = item.name;

var id = eval(item.id);

var enchantments = item.enchantments;

 

var stack = new ItemStack(parseInt(id), 1, 0);

stack.setItemName(name);

 

for (var e in enchantments) {

stack.addEnchantment(eval(enchantments[e].type), enchantments[e].level);

 

startNode.loot.add(stack);

}

 

provider.levelStarts.add(startNode);

provider.levelSizes.add(4);

 

if (descriptor.loot != null) {

var loot = descriptor.loot;

for (var l in loot) {

provider.addLevelLoot(LootManager.getWeightedLoot(eval(loot[l].type), parseInt(loot[l].amount), 1.0, parseInt(loot[l].chance)));

}

}

 

// create a random amount of next levels

var levels = 12;//random.nextInt(3) + 2;

var condition = 80;

for (var level = 1; level < levels; level++) {

 

// create next level start, a staircase

var levelNode = new DungeonStairs(random, level, 0, 5, 5+10, 10, condition, 0, true, true);

provider.levelStarts.add(levelNode);

provider.levelSizes.add(4+random.nextInt((level/3)+1));

 

if (descriptor.loot != null) {

var loot = descriptor.loot;

for (var l in loot) {

provider.addLevelLoot(LootManager.getWeightedLoot(eval(loot[l].type), parseInt(loot[l].amount), Math.max(1.0-(0.1 * level)), parseInt(loot[l].chance)));

}

}

 

condition-=random.nextInt(10);

}

 

// generate one stairs without autoexpand to trigger surface build

var levelNode = new DungeonStairs(random, level, 0, 5, 5+10, 10, condition, 0, false, false);

provider.levelStarts.add(levelNode);

provider.levelSizes.add(0);

 

// create surface start, autoexpanding to default which is ruins

provider.surfaceStart = new DungeonSurfaceStart(random, 0, 0, 200, 16, 200, 0, true, false);

 

return provider;

};

 

 

 

And here is one example of a descriptor for it, specialitem_swordofsharpness.json:

 

 

 

{

"name" : "The Sword of Sharpness",

"item" : {

"name" : "Sword of Sharpness",

"id" : "Item.swordIron.itemID",

"enchantments": [{"type":"Enchantment.sharpness","level":5}]

},

"loot": [

{"type": "Item.ingotGold.itemID", "amount": 4, "chance": 20},

{"type": "Item.goldNugget.itemID", "amount": 32, "chance": 40},

{"type": "Item.coal.itemID", "amount": 8, "chance": 40},

{"type": "Item.ingotIron.itemID", "amount": 8, "chance": 40},

{"type": "Item.feather.itemID", "amount": 8, "chance": 40},

{"type": "Item.porkRaw.itemID", "amount": 8, "chance": 40},

{"type": "Item.porkCooked.itemID", "amount": 8, "chance": 40},

{"type": "Item.slimeBall.itemID", "amount": 8, "chance": 40},

{"type": "Item.egg.itemID", "amount": 8, "chance": 40},

{"type": "Item.glowstone.itemID", "amount": 4, "chance": 40},

{"type": "Item.bone.itemID", "amount": 4, "chance": 40},

{"type": "Item.cookie.itemID", "amount": 8, "chance": 40},

{"type": "Item.chickenRaw.itemID", "amount": 8, "chance": 40},

{"type": "Item.chickenCooked.itemID", "amount": 8, "chance": 40},

{"type": "Item.potion.itemID", "amount": 4, "chance": 40},

{"type": "Item.enderPearl.itemID", "amount": 1, "chance": 20}

]

}

 

 

 

 

Remember to delete the existing extracted script folder when updating to a newer version so that its extracted again with the new scripts.

 

  • 3 weeks later...

Nice progress update!  Hopefully I will soon be able to understand what it all means!  (I have a feeling that if I examined it closely, I can figure out the gist of it, though, haha.)  I look forward to using your mod as it continues forward in development.

 

Faithfully watching, as always,

Llurendt

8)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.