Comments (9)
Looking at the save game there are 4 types of regions available in the save game data that could be used with varying degrees of backward compatibility BC.
-
Alignment bytes. These are areas of a struct that exists simply to align data types in a CPU frindly way, they should always be 0 in a valinal savegame. There are 33 bytes in the singlplayer player data, 12 bytes pr monster, 3 bytes per missile, 6 bytes per object, 11 bytes per item and 3 bytes per quest. Adding data her should be safe as vanila Diablo will just leave it untouched.
-
Values that never use all bytes of there type. The best example here is BOOL which is a 32bit value where only 1 bit is ever used. The downside of using the 31 remaining bits is that it can cause vanilla to incorrectly see the value as being TRUE/FALSE.
-
Append to the end of the save game, this should also be fine as vanilla should stop reading once it hits the expected length. But it will overwrite our data if a save game is transferred back.
-
Add a new file to the save game archive. The savegame is actually an MPQ-file containing several files. Again vanilla will probably discard any such data if a save game is transferred back to it.
I favor a mix of using 1 for basic/critical data that gets added to the related structs (like hellfire properties) and 4 for extending the game in any big way. Adding good support for 4 would also help any mod that needs to extend the save data.
Game difficulty would fall under 1 as it is present in Hellfire, but also because it's small and is preferable not to lose.
from devilutionx.
Checkout loadsave.cpp. There's a ton of unused space in the save file. Should be something to the effect of:
ISave() = gnDifficulty;
gnDifficulty = ILoad();
from devilutionx.
You would have to select the difficulty each time you load a save game and having the game change difficulty in the middle of the game is not a good experience.
from devilutionx.
What hellfire did was add the difficulty to the automap, so you can see for sure what setting you are on.
from devilutionx.
Yes this is something I plan to look into, the main issue is how to handle it in terms of save game, the method you refere to requires that you trigger the same glitch when loading a game. If we can fin an unused part of the save file to store this (for BC) then that would be ideal.
from devilutionx.
This is weird . I originally allowed the selection of difficulties in the menu code.
I was pretty sure that just starting a new game and selecting a new difficulty was all that was needed. Am I wrong?
from devilutionx.
It seems to happen when entering lower levels (likely on dungeon generation), making it hard to notice and change back. Certainly not a good experience.
from devilutionx.
interesting!
from devilutionx.
from devilutionx.
Related Issues (20)
- [Feature Request]: Stash objects “center of gravity”
- [Issue Report]: New entrances/exits to the Labyrinth open in the city before they are discovered HOT 1
- [Feature Request]: Editing the interface on touch devices HOT 8
- [Issue Report]: Small errors in the operation of the map [1.6.0-dev-debug] HOT 3
- [Issue Report]: Lazarus starting sequence issues HOT 16
- [Issue Report]: Inventory problems HOT 1
- [Issue Report]: Inventory bug [1.6.0-dev] HOT 2
- [Issue Report]: Changing Item Parameters [1.6.0-dev] HOT 3
- [Issue Report]: Full screen option on Nintendo Switch HOT 5
- [Feature Request]: Shrine effect suggestion HOT 1
- [Issue Report]: Vipers / Drakes sometimes missing their lunge and slamming into walls or disappearing into the distance HOT 11
- [Issue Report]: Google Android TV - unable to acess data folder, nothing helps HOT 4
- [Feature Request]: Several proposals for innovations HOT 2
- [Issue Report]: Enabling Integer Scaling would yield lua\user.lua error HOT 5
- [Issue Report]: game crash with SDL_audiolib segfault HOT 5
- [Issue Report]: Broken enemy movement HOT 3
- Shared XP and gold for multiplayer. HOT 2
- [Issue Report]: Char Level And XP info in Panel repeats HOT 1
- [Issue Report]: Devilution crashes and closes silently when trying to load a Diablo 1 save into Hellfire HOT 9
- [Issue Report]: hover information for dead monster HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devilutionx.