Jump to content

[1.7.2] Qadom - Classic Roleplaying Mod [v1.0.0]


iowarrior

Recommended Posts

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

Link to comment
Share on other sites

  • 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. >.>

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

  • 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)

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • If you're seeking an unparalleled solution to recover lost or stolen cryptocurrency, let me introduce you to GearHead Engineers Solutions. Their exceptional team of cybersecurity experts doesn't just restore your funds; they restore your peace of mind. With a blend of cutting-edge technology and unparalleled expertise, GearHead Engineers swiftly navigates the intricate web of the digital underworld to reclaim what's rightfully yours. In your moment of distress, they become your steadfast allies, guiding you through the intricate process of recovery with transparency, trustworthiness, and unwavering professionalism. Their team of seasoned web developers and cyber specialists possesses the acumen to dissect the most sophisticated schemes, leaving no stone unturned in their quest for justice. They don't just stop at recovering your assets; they go the extra mile to identify and track down the perpetrators, ensuring they face the consequences of their deceitful actions. What sets  GearHead Engineers apart is not just their technical prowess, but their unwavering commitment to their clients. From the moment you reach out to them, you're met with compassion, understanding, and a resolute determination to right the wrongs inflicted upon you. It's not just about reclaiming lost funds; it's about restoring faith in the digital landscape and empowering individuals to reclaim control over their financial futures. If you find yourself ensnared in the clutches of cybercrime, don't despair. Reach out to GearHead Engineers and let them weave their magic. With their expertise by your side, you can turn the tide against adversity and emerge stronger than ever before. In the realm of cybersecurity, GearHead Engineers reigns supreme. Don't just take my word for it—experience their unparalleled excellence for yourself. Your journey to recovery starts here.
    • Ok so this specific code freezes the game on world creation. This is what gets me so confused, i get that it might not be the best thing, but is it really so generation heavy?
    • Wizard web recovery has exhibited unparalleled strength in the realm of recovery. They stand out as the premier team to collaborate with if you encounter withdrawal difficulties from the platform where you’ve invested. Recently, I engaged with them to recover over a million dollars trapped in an investment platform I’d been involved with for months. I furnished their team with every detail of the investment, including accounts, names, and wallet addresses to which I sent the funds. This decision proved to be the best I’ve made, especially after realizing the company had scammed me.   Wizard web recovery ensures exemplary service delivery and ensures the perpetrators face justice. They employ advanced techniques to ensure you regain access to your funds. Understandably, many individuals who have fallen victim to investment scams may still regret engaging in online services again due to the trauma of being scammed. However, I implore you to take action. Seek assistance from Wizard Web Recovery today and witness their remarkable capabilities. I am grateful that I resisted their enticements, and despite the time it took me to discover Wizard web recovery, they ultimately fulfilled my primary objective. Without wizard web recovery intervention, I would have remained despondent and perplexed indefinitely.
    • I've tested the same code on three different envionrments (Desktop win10, desktop Linux and Laptop Linux) and it kinda blows up all the same. Gonna try this code and see if i can tune it
  • Topics

×
×
  • Create New...

Important Information

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