Last patch? Demo patch
http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.6.zip
http://www.swordofmoonlight.net/text/日本語/最新.zip (Japanese)
http://www.swordofmoonlight.net/text/English/Neutral.zip
Aye yai yai, I don't know how it happened but the fog got messed up by the last patch. This was because it thought it was to be applying the blending effect. What I don't understand is why my test project wasn't exhibiting that behavior. I thought about putting it under the microscope but decided it wasn't worth the time and effort.
I'm really sick of all the patches in this release. I mean I'm disgusted with myself to a large extent. I'm hoping it's just a cursed release.
This patch is actually the final patch of what I thought might be the next release, but actually I've recalled I'd considered just releasing a patch as a demo since I've still not built out a full scale scenario with two real maps of significant scale.
Since this patch is identical to what would be a demo I'm not going to make an odd numbered demo patch for it. I'm just going to write a blog post up and start a new discussion thread. Also even though there's enough here to do what KFII requires, I feel that lighting being missing from this feature set makes it a little bit incomplete.
I also kept getting stuck in Moratheia's opening titles. I thought I covered them in terms of multi-thread locks but I went back and looked and it seemed like not. So I hope they're covered now. I'm not sure what happened in that case.
After a little more testing to see if the code has stabilized I'm going to see about updating the TOOL folder.
The language packs have new UI things for SOM_MAP's events. For English it may just be new trip zone and action based activation features compared to that quick/dirty demo I shared a while back. For Japanese it's all new to be up-to-speed with the English version.
When I write a blog I will share some potential ways to workaround the missing lighting feature in case anyone wants to do early tests before I can work on it.
Anyway, this is technically a patch to fix things I broke. I will reshare this patch in the new topic/thread I should make sometime later today. I did work on some last minute things before posting this fix, even after I noticed the problem.
simple machines forum
- May 17, 2024, 11:22:56 PM
- Welcome, Guest
News:
Remember to make your own backup of posts before submitting.
91
on: January 31, 2022, 07:04:41 PM
|
||
Started by Holey Moley - Last post by Holey Moley | ||
92
on: January 27, 2022, 11:10:34 PM
|
||
Started by Holey Moley - Last post by Holey Moley | ||
Oh man, not another PATCH
![]() http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.6.zip I felt sick at my stomach when I found out I messed up the do_fix_circle_trip_zone_radius code from the other day's patch. I knocked out the event's radius instead of the unwanted one! I guess that was wishful thinking since it turned out the other one was too difficult to get at. I honestly don't understand how I miss these things. (Edited: I just rewrote the subroutine instead.) I also found a bug in the sky routine I use to resituate the sky in front of the transparent scene elements. It kicks in when the sky has more transparent elements than the scene itself, and there aren't 0 such elements. I guess I never saw it before because SOM's skies only have one transparent element, so that means it could never be more unless there are 0. So maybe this isn't interesting. (Edited: When blending skies all elements are transparent and there are two skies for the moment.) There's also code in place to blend the fog and sky across maps in this patch. I expected blending the sky to look kind of funky, but it's actually perfectly smooth and even. That's a relief. I was afraid it would be a weak point. I haven't quite figured out how to drive the blending parameter. In this patch it just blends it over the course of two seconds. That's actually what Dark Souls does. But it's not what I have planned. The one problem with my plan is it needs a notion of what is moving towards the new map and away from the old map, and that's not an obvious metric. I have some ideas but I have a feeling there won't be a perfect solution. But it should work fine most of the time if you don't do anything funny. I have to work on fading out the BGM. I'm surprised SOM doesn't have a system for that. I think it's mute function just cuts out. But I could be wrong. It's worded that way. Anyway, after that and some work on the Japanese language pack the next release cycle will be wrapping up. It's always annoying when the previous release gets patched to the degree it's the same as the new release. Sometimes it's easy to isolate features to a release and sometimes it would be more work than is worth it for "alpha" software. |
93
on: January 25, 2022, 11:42:18 PM
|
||
Started by Holey Moley - Last post by Holey Moley | ||
REPOST: I had to pull this post after more problems started to arise. It sucks to be a programmer sometimes. So, some time has passed since I originally posted this. (The new problem was because some new code I'd written in haste failed to make some important thread synchronizing objects because C++ has this annoying thing where if you don't write the name of an object it just pops in and out of existence as if it never really existed. In this case the threads were stepping on each others toes.)
------------------------------------------------------------ Patch Patch (Important) http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.6.zip The patch I put up the other day with map streaming capability has a critical problem where the textures will be lost when an old map is unloaded from memory (kicks in a few minutes after switching maps without using the standby map system.) Off-topic: While working on blending skies I found out that some extension code I think I thought was doing a "Z-test" optimization on the sky was being defeated by some code I might not have understood, although it's possible I did but couldn't solve it at that point, but I don't see notes to that effect. So I rewrote the sky subroutine and it wasn't working with the Z-test, and that's because opaque MDO elements force on z-buffer writes. To get around that this has to be momentarily overruled just for the sky. Anyway, what this amounts to is a pretty good optimization when portions of the sky are hidden. I.e. this should improve frame rates significantly where applicable. Oh yeah, another weird thing I noticed yesterday is the circular trip zone event system actually adds the radius it's given to the object/character that's bound to the event's own radius. I've disabled this behavior. I added a do_fix_circle_trip_zone_radius extension to the Ex.ini file in case this breaks a game that can't be fixed. The square trip zone doesn't do this. I guess someone didn't get the memo. [EDITED: I also patched x2mdl (http://csv.swordofmoonlight.net/x2mdl.dll/1.0.0.2.zip) earlier today. It wasn't working with when the model has no (0) polygons/vertices (i.e. a dummy) because of some error checks I wrote for reasons I'm not sure why.] |
94
on: January 20, 2022, 02:12:40 PM
|
||
Started by Holey Moley - Last post by Holey Moley | ||
Here (attached) is a copy of SOM_MAP that can be copied into the TEXT/English/Neutral.zip (or if unpacked dropped into the Neutral folder) to add an event "module" to SOM_MAP to be able to direct an event to load a map in the background. It's just something to play around with in the meantime if anyone wants to try this out. (I've been talking some lately with "Verdite" who's responsible for the Moratheia project.)
A word of warning is if you remove (rollback) this patch or this language pack feature then SOM_MAP will quietly remove the event "module" from your events. I've also updated yesterday's patch just now just to add a little readout to the F6 display that will show the second map in memory under the "map" heading. You can confirm it's working that way. I'm thinking about how to display the percentage of the maps' loading progress, but didn't add that yet. Generally they will load in a second or so, but there's no precise way to say given that PCs all have different capabilities. If loading is that fast then a loading percentage readout might only be a blip. In the present state you need to check the new "Relative" option in the map transfer event module to get the maps to change without any visual indication. I don't know if there's any other route to doing this than this way. I have to study it some more if so. (Edited: The problem is that the preexisting behavior likely has to change to let the other modes be used this way, and I'm not sure it's worth it given limitations.) Of course the sky and fog settings will be a tell unless they're identical. I'm still working on this. I think that lights system I spoke of will also entail settings for overriding the fog and sky and map title and BGM. This will let you designate organic subsections of maps as having different conceptual localities. Plus KFII has tiles with custom fog that have to be implemented for my project to faithfully reproduce them. It's still possible to blend in the fog on map changes, as it would be possible to do with the ambient light if it wasn't burnt into the maps' vertex colors. (I don't know what it will mean to have a variable sky, most likely it will just be a way to switch between interior and exterior sections.) |
95
on: January 19, 2022, 07:59:24 PM
|
||
Started by Holey Moley - Last post by Holey Moley | ||
Emergency Patch
http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.6.zip I learned 2 days ago that I messed up again and had broken sound effects on "objects" and the magic equipment (and a few other things too) but I was too deep into debugging the new background loading system to be able to publish a patch... and a little embarrassed to be making so many patching posts. I hoped I could iron out some troubles yesterday, but it took me 2 days of keep running into things. (Plus I figure probably next to no one is downloading these patches. I make them out of principle.) I don't like how the work on the next release is being consumed into this release. It's about tantamount to just roll it into this release as an early demo. I will announce it since it's an interesting juncture. Technically it can be used with this patch but just requires a language pack with the extra event module for SOM_MAP. I may upload that tomorrow as a sneak preview. I still have to work on blending the fog and sky to call it good enough to officially publish it. I won't be surprised if something breaks, but this patch/version will start loading the first map either when the New Game option is chosen, in which case an intro sequence can hide the loading, or if do_start and start_mode=1 is used it will start loading as soon as the first title screen. I also intend to work on starting the load when a save file is chosen, since it takes some time to move the button up to Yes (it defaults to No) which can be enough to load a game. Currently it can take time to process textures, which this patch doesn't do all immediately. I've been able to improve the start of maps, especially when they fade in. The first frame will process everything that's in its scene, but after that it starts processing in the background and goes ahead and starts playing the map. This would benefit from implementing the prioritization system I've in mind even now. But I also intend to move that processing into x2mdl ASAP. Technically even x2mdl runs in the background now, so it might not even be noticed if lucky. I've had to switch Direct3D 9 over to a "multi-threaded" mode, which is supposedly pretty flaky and naive. It might not be necessary if these textures were processed by x2mdl but it can take several milliseconds to process them at runtime, which is too much to do on the same thread as Direct3D. It seems to work, but it can't upload textures without jamming, so I've set it to upload one processed texture per frame. Of course if a model actually requires a texture it will be uploaded in addition to this, and too many can result in a hiccup. It might be nice to be able to fade things in a little late in that case to avoid frame drops. I think only NPCs and items fade in normally. Support for NPC reskins is limited too. The model preloading system isn't fully aware of skins now, so it will apply the first skin to a model, so that model will never have a different skin if there's more than one. I will work on this. I don't know if the Moratheia 2.1 demo doubles up models with skins. Now with MDL+MDO skins aren't required but can be an optimization for "palette swapped" NPCs. There's also the start of an alternative "item" pickup experience, but it feels a bit flat. I will have to study KFII to see if it has any sound effects involved. It can be jarring to not have the visual spin around and rise up. I have to work on that. Luckily this can be turned on and off in the Options menu. I will probably update the TOOL folder again after some sleep and more testing and confidence this time. |
96
on: January 16, 2022, 04:45:52 PM
|
||
Started by Holey Moley - Last post by Holey Moley | ||
follow-up
I found myself doing a small project at the end of the day from the previous reply in this topic/thread about converting a useless option into a way to get classic KF style experience when examining items. I just laid down the basics. I still have to work on animating the item transition and manipulating it with the controller to call it finished. But something really weird I discovered is the third toggle option that hides items in menus doesn't actually prevent the model files from being loaded up. That's really weird because I assumed its purpose was to speed up the menus. And I was surprised it even hides items from the pick up screen... which is doubly bizarre since they completely disappear from the scene before appearing in the menu display, so that with this option enabled (or technically off) it looks as if the object (item) has disappeared entirely from the game. I hope I can find time to mess around with this more before long but it's good either way to be rid of that funky option in the meantime. I have set up a button toggle to turn the menu on and off with the triangle button or J key, but it only works when examining items outside of menus. I'm thinking about having the other button show text, but the menu shows the name too, so it can be used to reveal the name briefly before taking the item. Edited: Oh yeah, for the default English I called it "Examine Display" and I'm thinking of leaving the Japanese alone since it calls it Item Display (in Japanese) which seems close enough to the meaning. |
97
on: January 15, 2022, 01:28:15 AM
|
||
Started by Holey Moley - Last post by Holey Moley | ||
Patch Patch
http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.6.zip Yesterday's patch had a bad number in it (offset to the PARAM/OBJ. I had to update the TOOL folder (again) and I'd like to consolidate the last three posts, but I feel like there's information in them that would be collateral damage if so. Daily patches never get old. It feels like once a release is published its patching draws on until the next release. Probably a good reason to hang back one release cycle. |
98
on: January 14, 2022, 11:43:15 AM
|
||
Started by Holey Moley - Last post by Holey Moley | ||
Patch
http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.6.zip I found out I missed two subroutines that attach equipment graphics to the arm model. One of the annoying things about Ghidra is it tells which subroutines use which subroutines, but not how many times they do or the places that they do, so it's easy to forget to manually use F3 to search for duplicate instances. I've updated the TOOL folder to complement yesterday's arm equipment related patch. I should've put some gloves on (in the game) but I usually don't have that on in my tests. BTW today I had to rewrite the equipment code from scratch. I figured out yesterday it had a lot of problems around ref-counting its sound-effects and SFX (special effects) references. The hacks I'd accumulated around it were getting to be too much anyway. It's a lot nicer system now. The NPCs and objects (character models) didn't have code for decrementing their ref-counts, so I had to add that, and rewrote their code too to only make references for each item in SOM_PRM instead of each in SOM_MAP. There's also numerous (fixed) bugs in the SFX and SND references code itself. I think I'm through the woods on improving how resources are juggled. Next is (finally) loading object/character models in the background. The background loading system will also be helpful for speeding up the start of the game. I'm going to add something to the game INI file to remember the last map you played and assume it will be the one you will play next time, and go ahead and start loading it from inside the title screens. |
99
on: January 13, 2022, 05:52:34 AM
|
||
Started by Holey Moley - Last post by Holey Moley | ||
Important Patch
http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.6.zip This patch fixes a new crash on leaving the Inventory screen (a minor screen for hiding items to have fewer to scroll through) AND the arm model (arm.mdl) has special needs for using the new MDL+MDO system that didn't occur to me. Namely it needs to hide its segments (i.e. the hand, forearm, etc.) selectively. The arm code needs a patch to hide the MDO elements instead of the MDL elements (which don't exist) so no the arm segments aren't going to be hidden when putting on gloves for example without this patch. |
100
on: January 08, 2022, 10:52:11 AM
|
||
Started by Holey Moley - Last post by Holey Moley | ||
Important Patch
http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.6.zip I'm not sure when this started, but I just noticed the Brightness option was disabled. It turned out a whole file (http://svn.swordofmoonlight.net/code/SomEx/dx.ddcaps.inl) was excluded from the build by a // programming comment, that I swear I doubt I inputted. Sometimes the editor inserts random things into text based on esoteric key combinations. In this case it probably made the video card seem to have no functionality. Fortunately the brightness (gamma) functionality was the only thing I noticed trouble with, but it could have further reaching effects. I've updated the TOOL folder with the previous patch. The last patch also probably breaks synchronization of the "systemwide" events on map change. (This one--hopefully--fixes it.) I've been working furiously the past 2 days on shuffling a lot of things around to decouple loading MPX files from the global game level state so more than one map can be managed at a time. There's a good chance this will cause some fallout afterward as sometimes its hard to remember what has been manipulated to change SOM's behavior. It's dicey to publish patches with this degree of changes in play but in this case the bug is too great to ignore. That "decoupling" is done now. I still have a lot of work ahead to transition maps without being noticeable. The main things are loading files (of course) and then controls (sounds trivial but it's not) and finally the parameters of the source and destination maps has to be smoothly blended (faded) somehow. I hope to do this gradually and imperceptibly only as you move away from the spawn point, but for some things like sky models it's going to be pretty obvious without sacrificing too much performance. |