The Void

A place to discuss The Void by Shicko.

The Void

Postby Schicko » Sun Nov 05, 2017 2:06 pm

About
This is a topic to discuss the project called The Void which began as a small expansion called The Room around 2015, was later remade as Shik's Abode (see viewtopic.php?f=31&t=369&p=11171#p11171), and then again as World 0 in the new editor, and finally as The Void.

The project comprises of multiple expansions or "editions" which is necessary to circumvent the script/dialogue storage limits of the file format that expansions use. The main edition, simply called The Void, includes most of the features of the others but probably will not be updated as frequently, unless the file format and editor are updated to accept larger script/dialogue sizes. Currently, the expansion provides various merchandise and services. It also includes a customisable arena in which different (non-unique, non-quest-related) enemies of choice can be battled.

The Void Base is the most basic edition which only includes the "Travel" and "Wealth" shared dialogue and scripts. It is used as a template for other expansions and provides an easy way to alter the player's money for easy testing of features during development. To prevent cheating, the "Wealth" dialogue can be removed from NPCs' dialogue lists (or its condition set to "Never") in production releases of expansions.

The rest of the editions are named after which dialogue topic they provide in addition to those found in The Void Base, e.g., The Void Attributes provides the "Attributes" topic in addition to "Travel" and "Wealth". All of the editions of The Void can be visited by talking to Captain Verra in the Port of Matras, but only one should be present in your expansions directory as they all use the expansion id "void" and will conflict with each other if more than one is present.

Any constructive criticisms, help and advice on improving the expansion, as well as any suggestions would be greatly appreciated.

To do
I don't promise anything about this, but I may add more features to the expansion in the future as I sporadically use this game's editor every couple of months. This is because I started playing this game as a kid on my dad's PocketPC and the game's editor is my first foray into programming which I love to do, so it has great nostalgic value for me and I find myself gravitating towards it when I'm bored even after all these years. List of things I would like to do with this expansion:

  1. Optimise scripts and dialogues to use less space to be able to try and fit them all. (already in progress)
  2. Possibly split into multiple expansions to get around size limits. (already in progress)
  3. Rewrite all topics that involve transactions to automatically show costs and amounts on-the-fly (already in progress).
  4. Add a way to purchase all (non-unique, non-quest-related) items from the base game and other expansions if these are enabled. (already in progress)
  5. Add options to battle all (non-unique, non-quest-related) opponents found in other expansions if these are enabled. (already in progress)
  6. Make a "mega" dialogue topic which combines all the dialogue topics to one (or make a couple of mega topics) and theoretically might be able to save some space, at the expense of granularity.
  7. My initial idea instead of The Arena was The Maze, which evidently would be a maze, but one that would have had customisable visibility and opponents, like The Arena, and which would also have been randomised every time it was entered. It proved a bit complicated to make, so I made The Arena instead. This doesn't mean that it seems impossible to make though.

    I think that in order to make it, I would need to assign a name to each block in The Maze, then when activated (e.g. when a player first steps inside), a way to generate a maze that is solvable depending on its size (which would also be customisable) and the starting position. Each of the blocks' visibility states in the maze would be set and read from using global variables depending on whether or not it is a path or a wall which would be determined by the algorithm.

    I haven't quite figured out a way to generate mazes using the editor's scripting language yet though as this is complicated by the fact that the language has no loop or function definition features, so any help/advice would be appreciated.
  8. If I manage to make The Maze, I may make it randomly change paths as the player walks through it (whilst still remaining solvable from the player's current position). Not sure how doable that would be though.
Disclaimer
No guarantees are made that obtaining copies or otherwise accessing the files related to this project will not void your computer's warranty, kill your grandmother's pet goldfish or even cause your hair to fall out, so do so at your own peril. Regardless, they are provided free of charge to use or copy, now and forever. Just please don't sue the creator and any contributors if anything bad happens to you or anyone you know if you do. This disclaimer is subject to change at the creator's discretion.

Downloads
The Void questworld file - https://www.dropbox.com/s/d7sargpt4p3hz ... world?dl=0
The Void pak file - https://www.dropbox.com/s/01k3ufhwooqzl ... d.pak?dl=0
The Void Base questworld file - https://www.dropbox.com/s/5fx6y2k10xeek ... world?dl=0
The Void Base pak file - https://www.dropbox.com/s/qr25axstjun0a ... e.pak?dl=0
The Void The Arena questworld file - https://www.dropbox.com/s/8lpd5t6waiwwb ... world?dl=0
The Void The Arena pak file - https://www.dropbox.com/s/hh26b202qeefb ... a.pak?dl=0
The Void Attributes questworld file - https://www.dropbox.com/s/3na10xzyqa3lb ... world?dl=0
The Void Attributes pak file - https://www.dropbox.com/s/75he9rouh13fp ... s.pak?dl=0
The Void Clear Crime questworld file - https://www.dropbox.com/s/qlrj5izcnuwoo ... world?dl=0
The Void Clear Crime pak file - https://www.dropbox.com/s/50067z1qw0ydx ... e.pak?dl=0
The Void Enchant questworld file - https://www.dropbox.com/s/3gojojwykw73o ... world?dl=0
The Void Enchant pak file - https://www.dropbox.com/s/0749rtiobnuiz ... t.pak?dl=0
The Void Heal questworld file - https://www.dropbox.com/s/90w4cc7w5l4r6 ... world?dl=0
The Void Heal pak file - https://www.dropbox.com/s/kl0y4hpi6nb91 ... l.pak?dl=0
The Void Skills questworld file - https://www.dropbox.com/s/8vv8yhrjk139n ... world?dl=0
The Void Skills pak file - https://www.dropbox.com/s/5u20qntu1tlfz ... s.pak?dl=0
The Void Spells questworld file - https://www.dropbox.com/s/lg9y71heraq26 ... world?dl=0
The Void Spells pak file - https://www.dropbox.com/s/y7q8arub9jowq ... s.pak?dl=0
Source codes of scripts used - https://www.dropbox.com/sh/ioq695tdz6v5 ... 2ZIPa?dl=0
Steam Workshop page - https://steamcommunity.com/sharedfiles/ ... 1770653057

Changelog
  • 2019-06-30: Fixed the "Spells" dialogue in The Void Spells. Choosing "Drain Health Touch" or "Warrt" now works.
  • 2019-06-28: Fixed "Combatant Procurement Request" spell in The Void The Arena. Unfortunately, I am unable to merge the fix into The Void.
  • 2019-06-25: Managed to update The Void without the editor crashing. It now contains the updated dialogue topics and scripts from the other expansions sans "Spells", "Heal", "Enchant" and "Clear Crime".
  • 2019-06-24: Updated The Void Spells to handle spells from The Islands of Ice and Fire. Updated The Void The Arena to also contain enemies from The Islands of Ice and Fire. Todo: fix The Void which currently doesn't properly teleport players out of The Overseer's office (this is not an issue in The Void The Arena, but I can't merge the changes from that dure to size limits).

    I reckon I'll take a break from making expansions for a while since I can't really make any more progress without the file format or the editor being updated to handle larger scripts. If it does get fixed, I want to merge all the changes from the smaller expansions back into The Void, add support for other expansions and optimise the scripts further where possible.
  • 2019-06-23: Added The Void The Arena and The Void Spells. Todo: handle spells from expansions, possibly merge with "Merchandise".
  • 2019-06-20: Included links for The Void Clear Crime and The Void Enchant. Rewrote some scripts in The Void Skills to show when money will be gained.
  • 2019-06-19: Included links for The Void Base, The Void Attributes, The Void Heal, The Void Skills and information about editions. Replaced dialogue and scripts in The Void with dialogue from The Void Attributes and The Void Skills, sans the "Wealth" dialogue which causes the editor to crash when saving.
  • 2019-06-18: Refactored a lot of scripts so they are smaller. Rewrote "Skills" dialogue so it shows costs like "Attributes" does.
  • 2019-06-17: Started rewriting "Merchandise" topic and scripts to include items from other expansions and the base game, as well as to allow buying more than one item at a time, as well as to automatically indicate how much the total cost is and how many items can be afforded as the amounts are being chosen. "Attributes" dialogue topic now shows costs of options. I seem to have hit a wall with the editor though because I can't increase the scripts' sizes substantially without causing the editor to crash when saving.
  • 2019-06-16: Fixed spelling mistake "Cyclop" -> "Cyclops". Fixed issue that prevented "Expert Mugger" from being selected as opponent. Fixed uses of `setmapfog()` function in scripts. Removed options to decrease skills and attributes below limits. Potential todo: remove messages that trigger when player attempts to decrease skills or attributes below limits which shouldn't be needed anymore but should probably be kept just in case.
  • 2019-06-15: Fixed choosing witches as opponents. Fixed an issue where the player is teleported to coordinates (0,0) instead of back into The Arena. Fixed an issue with opponent selection caused by my attempts to use `||` logical operators which I guess weren't valid. Minor tweak to opponent adding feature which now causes it to say what opponent has been added. Removed dragons as an opponent because they are non-aggressive.
  • 2019-06-14: Added The Arena. Todo: fix the option to choose witches as new opponents.
  • 2019-06-10: Renamed from "World 0" to "The Void". Changed the world id from "0000" to "void". Note to other users of the editor: never use numeric world ids, it breaks some functions of the editor. Fixed `Attributes` topic. Decreased file size by replacing all dialogue with shared dialogue and refactoring scripts. Changed room layout.
  • 2018-12-02: Made cost of heal proportional to health and mana lost. Made cost of clearing crime proportional to severity of crime.
  • 2017-11-12: Added empty wands.
  • 2017-11-10: NPC no longer sells items from all expansions because choosing Buy/sell option crashes game if other expansions are enabled. Added other NPCs that sell different quality items.
  • 2017-11-07: Updates and fixes. Everything seems to work ok for now.
  • 2017-11-06: Updates and fixes. Oh haha strikethrough isn't enabled in the forums apparently.

Original post for posterity
Hi all. I recreated an old testing expansion I made a while ago using the new editor:
https://www.dropbox.com/s/d7sargpt4p3hz ... world?dl=0
https://www.dropbox.com/s/01k3ufhwooqzl ... d.pak?dl=0

Most of it works pretty well, however some scripts in the dialogues of 0000_npc_0 don't work as intended or freeze:

  • [s]For the Attributes and Skills dialogues, when set to values lower than 15 and 10 respectively, the scripts are supposed to output a message saying this isn't allowed, then end, and then let the player select other dialogues options or exit, but the script freezes after the message instead.[/s] -fixed
  • [s]For the Attributes dialogue, the attributes only [s]increase[/s] change by a maximum of 10 even if the value chosen has a difference larger than 10 to the old value.[/s] -fixed
  • [s]For the Money dialogue, the script freezes between states [s]4 and 5[/s] 2 and 3 after choosing the [s]hundred-thousands[/s] millions value.[/s] -fixed

Would really appreciate if someone explained why these happen and what should be done to fix them.

Also, I'd like to know - is there a loop statement or something similar that can be used in the scripts?

Lastly, hint to users of the old editor, the skills Heal Magic, Mercantile and Persuade have been renamed to Healing Magic, Appraise and Persuasion. Took me a while to realise when I was trying to figure out why my old scripts wouldn't work XD.
User avatar
Schicko
 
Posts: 40
Joined: Sat Nov 12, 2011 11:02 am
Location: In your inventory

Re: Dialogue scripts freezing

Postby Elendil / Redshift » Mon Nov 06, 2017 2:05 pm

There are no looping constructs.

I'll try looking into the other problems as soon as I can.
User avatar
Elendil / Redshift
Site Admin
 
Posts: 756
Joined: Sun Oct 09, 2011 11:35 am

Re: Dialogue scripts freezing

Postby KGold » Mon Nov 06, 2017 3:27 pm

After about an hour of messing around with the file, I managed to find a solution to the first problem on your list. 8-)

Schicko wrote:*For the Attributes and Skills dialogues, when set to values lower than 15 and 10 respectively, the scripts are supposed to output a message saying this isn't allowed, then end, and then let the player select other dialogues options or exit, but the script freezes after the message instead.


The problem was kind of simple yet difficult to spot: seems like you can't add answers to a text with the script 'goodbye();' attached to it, since it's contradictory, if you know what I mean...(if I tried to develop this, I'd fail really hard, so I'm keeping it simple :D )
The point is I altered the file a little bit, so the problem should be gone. I took the script detecting whether the player set a sufficient value, unsquashed it and created two texts for the two parts: one saying that 10/15 is the minimum value a skill/attribute can be set to, and one asking if the player wanted to execute the alteration. This way, only the first text has the 'goodbye();' script, whilst the second one has the answers. I added a 'gonext();' script to the first one, so that the program will run both scripts in case the players sets a suitable value.

Hope this little explanation was useful ;)
You can access the updated file via this link: https://www.mediafire.com/file/auclykh9 ... questworld

Finally, I'd suggest creating two lists for the skills: one for undead players, which lacks the 'Heal Magic' option and one for living players without the 'Undead Magic' option, to avoid any further confusion ;)

I'll see what I can do with the rest of the issues. By the way, your scripting skills are impressive!
If you have been really too busy,
And you feel your head being dizzy,
It's recommended to have a rest,
I have a good offer-play the Quest! : )
User avatar
KGold
 
Posts: 136
Joined: Sun Jun 10, 2012 3:21 pm
Location: Hungary

Re: Dialogue scripts freezing

Postby Schicko » Mon Nov 06, 2017 8:10 pm

KGold wrote:The problem was kind of simple yet difficult to spot: seems like you can't add answers to a text with the script 'goodbye();' attached to it, since it's contradictory, if you know what I mean...(if I tried to develop this, I'd fail really hard, so I'm keeping it simple :D )
The point is I altered the file a little bit, so the problem should be gone. I took the script detecting whether the player set a sufficient value, unsquashed it and created two texts for the two parts: one saying that 10/15 is the minimum value a skill/attribute can be set to, and one asking if the player wanted to execute the alteration. This way, only the first text has the 'goodbye();' script, whilst the second one has the answers. I added a 'gonext();' script to the first one, so that the program will run both scripts in case the players sets a suitable value.


Ah yes I understand the problem now. Thanks for the explanation and fix.

KGold wrote:Finally, I'd suggest creating two lists for the skills: one for undead players, which lacks the 'Heal Magic' option and one for living players without the 'Undead Magic' option, to avoid any further confusion ;)


I've updated the files in my original post to include your fix for the problem as well as implementing this suggestion, in addition to refactoring and hopefully improving the readability of my ugly code. For this suggestion of yours, I initially tried to use the player.getrace() function and match its result to "base_rasvim" in an if-else statement, but this wouldn't work so I used conditions (PCUndead and PCRace) to implement it instead, not sure if this is the better way to do it though.

KGold wrote:By the way, your scripting skills are impressive!


Aw gee, thanks! My skills are probably pretty crap compared to actual programmers' though. I'd been trying to learn actual programming (really interested in the Rust language) but unfortunately don't have enough time due to my university studies.

Edit: I tested my updated file using the game and tried the Money dialogue again. This time the script freeze problem happens between states 2 and 3, after choosing the millions value. Also, I found out that in the Attributes dialogue, the attributes only change (instead of just increase like I said previously) by a maximum of 10 even if the value chosen has a difference larger than 10 to the old value.
User avatar
Schicko
 
Posts: 40
Joined: Sat Nov 12, 2011 11:02 am
Location: In your inventory

Re: Dialogue scripts freezing

Postby Catacomber » Tue Nov 07, 2017 7:07 am

I'm kind of strapped for time right now but took a quick look at your file. You have all items checked for sale. That's probably one reason why a player would freeze. It would work in the editor but if someone is playing the base game in embedded mode and possibly even the standalone version, with all items checked for sale the game engine has to check across the base game and all expansions to find all the items for sale and it's just most likely going to cause a crash.

I don't think that has anything to do with your other crash but it would be a problem.

Also, remember to keep game balance in mind. Offering high limits for resale is not going to keep the game balanced. : ) I know it's tempting. Almost every player right now is probably as rich as Croesus but always balance things.
User avatar
Catacomber
 
Posts: 1371
Joined: Tue Oct 25, 2011 5:20 am
Location: New York City

Re: Dialogue scripts freezing

Postby Elendil / Redshift » Tue Nov 07, 2017 8:40 am

For the second problem: "addatributevalue" cannot change an attribute by more than +/- 10. It's hardcoded that way. Looking into the third.
User avatar
Elendil / Redshift
Site Admin
 
Posts: 756
Joined: Sun Oct 09, 2011 11:35 am

Re: Dialogue scripts freezing

Postby Elendil / Redshift » Tue Nov 07, 2017 12:35 pm

And I've found the culprit for problem number three (sort of): Although the Quest script supports 32 bit integers (integers which are larger than 32767 or smaller than -32768), the support is bugged. Under certain circumstances (which are not exactly clear, that's why I said "sort of"), 32 bit integers get misread which results in script failure. That's what is happening in the money script with ten million. It happens to work with all the other values (hundred million, million and hundred thousand), but it fails with 10000000.

Probably no one really used large numbers in scripts until now (or they happened to be working), that's why it wasn't discovered.

I'd rather not try and fix it, it could result in more obscure bugs... But no worries, there is an easy workaround. :) Any time you need a number larger than 32767 or smaller than -32768, build it up from smaller ones. For example 10000000 is 10000 * 1000. I replaced "10000000" with "10000 * 1000" in the script and now it works.

(If you happen to need "10000001" you could use "10000 * 1000 + 1", for example. All large numbers can be built up in this way. Hopefully you'll not need too many large numbers. ;))
User avatar
Elendil / Redshift
Site Admin
 
Posts: 756
Joined: Sun Oct 09, 2011 11:35 am

Re: Dialogue scripts freezing

Postby Schicko » Tue Nov 07, 2017 4:12 pm

Catacomber wrote:Also, remember to keep game balance in mind. Offering high limits for resale is not going to keep the game balanced. : ) I know it's tempting. Almost every player right now is probably as rich as Croesus but always balance things.


True haha. However, my expansion was made entirely for testing purposes only. But thanks for the advice anyways, I'll keep your words in mind for if and when I make a proper expansion.

Elendil / Redshift wrote:For the second problem: "addatributevalue" cannot change an attribute by more than +/- 10. It's hardcoded that way. Looking into the third.


Ah I thought so, I've changed the Attributes dialogue scripts to account for this now.

Elendil / Redshift wrote:I'd rather not try and fix it, it could result in more obscure bugs... But no worries, there is an easy workaround. :) Any time you need a number larger than 32767 or smaller than -32768, build it up from smaller ones. For example 10000000 is 10000 * 1000. I replaced "10000000" with "10000 * 1000" in the script and now it works.


Haha fair enough, thanks for the explanation and fix though, I've integrated it into the expansion file and everything seems to work ok now.
User avatar
Schicko
 
Posts: 40
Joined: Sat Nov 12, 2011 11:02 am
Location: In your inventory

Re: Dialogue scripts freezing

Postby Schicko » Fri Nov 10, 2017 12:34 pm

Catacomber wrote:I'm kind of strapped for time right now but took a quick look at your file. You have all items checked for sale. That's probably one reason why a player would freeze. It would work in the editor but if someone is playing the base game in embedded mode and possibly even the standalone version, with all items checked for sale the game engine has to check across the base game and all expansions to find all the items for sale and it's just most likely going to cause a crash.


You're right Cat, it does crash the game if other expansions are enabled. I've unticked the "sell all items" box now as well as making other updates to the file. Thanks again for the advice.
User avatar
Schicko
 
Posts: 40
Joined: Sat Nov 12, 2011 11:02 am
Location: In your inventory

Re: The Void

Postby Schicko » Sat Jun 15, 2019 7:03 pm

Would it be possible to move this topic to viewforum.php?f=32 or maybe even to its own sub-forum there (like with Jacob's currently non-existent expansion which has viewforum.php?f=33)? It has changed from being a topic only about the problems I encounter when using the editor to a topic about "The Void" so it seems appropriate to move it away from the editor's forum.
User avatar
Schicko
 
Posts: 40
Joined: Sat Nov 12, 2011 11:02 am
Location: In your inventory

Re: The Void

Postby Elendil / Redshift » Sun Jun 16, 2019 6:12 am

Created subforum, moved topic. ;)
User avatar
Elendil / Redshift
Site Admin
 
Posts: 756
Joined: Sun Oct 09, 2011 11:35 am

Re: The Void

Postby Schicko » Sun Jun 16, 2019 6:24 am

Much appreciated Elendil!
User avatar
Schicko
 
Posts: 40
Joined: Sat Nov 12, 2011 11:02 am
Location: In your inventory

Re: The Void

Postby Schicko » Mon Jun 17, 2019 12:27 pm

I'm having problems saving my expansion in the editor (the same one as in the first post of this topic. What I'm trying to achieve is to rewrite the shared dialogue topic "Money" with id `void_topic_money` to be the same as the dialogue topic "Wealth" with id `void_topic_wealth` in https://www.dropbox.com/s/5fx6y2k10xeek ... world?dl=0 or https://www.dropbox.com/s/qr25axstjun0a ... e.pak?dl=0. The editor seem to be fine up until I try to save, whereafter it will crash and the questworld file will not have been updated. I suspect I've reached some kind of storage limit for scripts but, short of splitting up the expansion in to multiple smaller ones (which is not ideal as this would involve travelling between them to access different dialogues), I'm not sure how to solve this issue to be honest, so I'd really appreciate some help. :?
User avatar
Schicko
 
Posts: 40
Joined: Sat Nov 12, 2011 11:02 am
Location: In your inventory


Return to The Void

Who is online

Users browsing this forum: No registered users and 1 guest