migration to 5.0 notes add

master
mckaygerhard 2023-01-12 18:17:30 -04:00
parent 95f3980694
commit fceb855f2a
1 changed files with 80 additions and 0 deletions

View File

@ -1,6 +1,86 @@
### migration to mt 5.0/5.2
There are the issues Tignasse Verte mentionned: Adding `placer` in `register_functions.lua`
and replacing the two occourances of `nodeupdate` with `minetest.check_for_falling`.
Other changes are necessary because I changed (and had to change) quite a lot
in `mg_villages` internally recently. If you want to get further with running
the game under newer versions of MT, replace the versions of `cottages`, `handle_schematics`
and `mg_villages` AdventureTest comes with with the newest versions.
Then, remove the line `mg_villages.on_generated(minp,maxp,seed)` in
`adventuretest/register_functions.lua`. This may have an impact on quests the
old explorer is handling out, but if you ignore these for now, the world ought to be usable.
Comment out the file/content of `mg/fill_chests.lua` for now as that requires
a few adjustments for filling the chests with the right content, and that's a bit
too much to write here in an inconvenient forum post.
You won't see any villagers spawning because their spawn blocks are not placed.
My first attempts there ended in a severe overcrowding of villagers. Needs
finetuning/understanding what BrandonReese did to keep it balanced. But then,
this seems to be an open issue on Github as well...
Mobs will likely not work very well. A lot changed regarding them.
They certainly could use an update as well - as could the goblins. I'm sure the witches
from the same modder would feel welcome in the AdventureTest universe, too.
###### now the changes in fact:
DFeniks wrote:
2020-01-07 10:02:08: ERROR[Main]: ServerError: AsyncErr: Lua: finishGenRuntime error from mod 'default' in callback item_OnPlace(): ...enturetest/mods/adventuretest/register_functions.lua:101: attempt to index local 'placer' (a nil value)
Reason on server-side :
Here are the changes made on server-side, concerning item_OnPlace, for the 5.X.X :
https://dev.minetest.net/Changelog,
0.4.16 → 5.0.0 , Released March 4th 2019 / Server-side / User interface / Items
Set placer to nil instead of a non-functional one in item_OnPlace (DTA7)
Here is why, you may have a nil placer. One issue had been logged :
https://github.com/minetest/minetest/issues/6487
place_node crashes the game because of nil player #6487
Here is the commit corresponding :
https://github.com/minetest/minetest_game/pull/1907/commits/73c5339adb8ff93328f5439bf842767b71e0ce6c
Add nil checks for placer #1907
Reason in the mod :
For Adventure Test, in `dungeons.lua`, you have line 33 a `minetest.register_on_generated()`,
in it, you have, line 161, a call of `minetest.place_node()`.
In `register_functions.lua`, you have a `minetest.register_on_placenode(adventuretest_placenode)`,
so the call of `place_node()` redirect to `adventuretest_placenode()`.
In the commit, I have found an example of change (a nil check) that can be done
in `adventuretest_placenode()`.
What to do :
Go to :
games\adventuretest\mods\adventuretest
There, change the file :
`register_functions.lua` replace the line 101 (`if placer:is_player() then`) with :
```
if placer and placer:is_player() then
```
0.4.16 → 5.0.0 :
`nodeupdate()` was removed. Fix: replace with `minetest.check_for_falling`.
In Adventuretest I have found 2 calls of `nodeupdate()` (may be there is more).
When it have been called, I got a crash :
`AsyncErr: ServerThread::run Lua: Runtime error from mod 'default' in callback LuaABM::trigger(): ...32\bin\..\games\adventuretest\mods\default/functions.lua:385: attempt to call global 'nodeupdate' (a nil value)`
What to do :
Change the file
`games\adventuretest\mods\default\functions.lua`
replace the line 385 (nodeupdate(p0)) with :
`minetest.check_for_falling(p0)`
Then, change the file `games\adventuretest\mods\doors\init.lua` replace the line 374 with :
`minetest.check_for_falling({x = pos.x, y = pos.y + 1, z = pos.z})`
### Fiel of view for monsters vs characters