Posts by Beta

The server was closed on April 2nd, 2023
https://pwmirage.com/forum/thread/342-we-are-closing/

    21/03/2020 done:

    * implement some algorithm to position the dialogue boxes automatically

    * allow connecting/disconnecting/reconnecting questions and answers

    * add a starting node -> connecting a question to it will make it an initial one

    * allow connecting questions only to answers and vice-versa

    * allow connecting an answer to only one subsequent question

    * implement edit mode for all text -> double clicking on a box will allow you to modify its text

    * serialize all data to the final JSON (parseable by the patcher)

    * add connection dots automatically as they're needed, and remove dots if they were disconnected

    * save positions of all boxes

    This is very helpful, thanks Entei!

    Could you verify all of those tomes are available in our version? https://raw.githubusercontent.…master/data/base/items.js

    I could find the last two, I hope the rest is there as well.


    Any tome can have up to 10 different stats. We can mix the options that other tomes have and create new, custom ones. There's going to be a lot of trial and error though, not all combinations might be possible.

    A few people already offered their help on creating the editor, but it's very hard at the moment. Anyone interested in contributing, please read the below.


    Majority of the code is the frontend written in javascript. I'm not really a javascript developer and the code I wrote is a mix of various styles, coding principles, etc. TBH I'm still learning javascript as I write this editor and definitely the new code I add now is much better than the code from 3 months ago. Still, I can imagine it asks for improvement. We're close to the release right now and I'm focusing on finishing the quest editor so that we're not blocked, but after the release, a new priority will show up: refactoring and cleaning up the code.


    From what I read there's at least a few things that need to be implemented in order to keep the codebase clean as it grows:

    • ES6 modules -> we use global variables and global functions everywhere. The "public" function names are currently prefixed with filename and that's OK, but the private ones aren't prefixed and could conflict in multiple files
    • Scoped CSS -> All CSS is currently global and already conflicts in a few places. Adding more CSS is difficult, because you need to ensure it targets only the element you want to modify and nothing else.
    • Classes? -> We're currently using global functions + HTML element objects for metadata (usually prefixed with mgw (as in MiraGeWindow)). This is OK, but could be improved. Maybe custom classes extending HTMLElement instead?
    • getting rid of jQuery -> We use both jQuery and native JS interchangeably. Some APIs accept jquery objects as parameters, some other native JS objects. We could implement a few utility functions like creating HTML elements from string, then drop jQuery completely and make the API consistent
    • error handling -> this could be easily simplified by using exceptions. We're currently just checking all variables. e.g. functions return -1 if they fail


    I'll push all javascript to github after the release and will do my best to describe the overall structure/concept so that others can contribute as well.

    Thanks!

    18/03/2020 done:

    * allow adding/removing additional dialogues and answers with a right click menu


    Note:

    Currently there can't be any orphaned answers - they must be linked to a question. I want to get rid of this limitation and will have to redesign things a bit.

    17/03/2020 done:

    * automate creating cache blobs. They're now generated automatically on project publish, then pushed to github when project is merged.

    15/3/2020 done:

    * migrate database of all original PW items/npcs/recipes/etc to github -> This greatly reduces traffic on pwmirage.com https://github.com/pwmirage/editor/tree/master/data/base

    * remove the server-side service for obtaining detailed item data. All static information is now stored on github


    to do:

    * serialize changes in the editor to usable data

    * start implementing left panel with quest details (briefing text, basic requirements - lvl range, rep, culti, class)

    that's an idea - although if the key is farmable from a daily quest like BH, then the chest needs to respawn very frequently for everyone to be able to open it. Otherwise ppl will end up with a stockpile of unused keys, which is not ideal.


    Maybe a weekly quest + events?


    We can make the items from chest character bound, but then what will be left to trade? ;)

    I love the idea! This must definitely happen.


    We have to keep in mind there might be alts and possible ways to abuse those chests. I see a few possibilities:

    a) we make the rewards mediocre and give the keys on daily basis (e.g. as vote rewards)

    upsides:

    * the reward is nothing special, so there's not much point in farming chests with alts

    downsides:

    * still, we must say in the rules that using alts is forbidden here, but how do we do it concisely? 1 chest per person per day? What if someone noticed some random chest on his alt. Should he pass? This is silly.


    b) we make the reward cool, and give the keys on special occasions / make them farmable

    upsides:

    * the rewards can be good this time -> there are more possibilities on what to put there

    downsides:

    * need to figure out where exactly those keys should come from


    I can make the chests respawn with random intervals using some automated scripts.

    11/02/2020 done:

    * send messages as any user (system/world/normal)


    16/02/2020 done:

    * implemented merging changes and restarting the server

    * there is a system message on restart indicating who exactly restarted it


    18/02/2020 done:

    * export/import character data

    * ability to fix corrupted character data (1 character was randomly corrupted on some server reboot)

    As for the drop rates, we've got the following variables to tweak:


    1) probability to drop each and every of up to 32 items (of any type)

    2) number of items to drop (each chosen randomly with the probability from #1)

    3) probability to drop nothing, 1 iteration of #2, 2 iterations of #2, or 3 iterations of #2


    Most mobs set #2 to 1 and have about 60% chance to drop nothing, 30% chance to drop 1 item, 8% chance to drop 2 items, 2% chance to drop 3 items.


    Bosses drop more so they usually have #2 = 2 or 3 and higher chances to have 2 or 3 drop iterations.


    #2 and #3 multiply, so if we set #2 = 4, and #3 = 100% chance for 3 iterations, we'll always get 3 * 4 items = 12 items chosen randomly from #1


    Suggestions how to tweak those variables are welcome.