Bugs in Phantasy 2018

Users who are viewing this thread

They all have a similar problem with the troop they want to talk about being  troop  -1, which doesn't exist.  The player is 0, and everything else, even a cow, has a number that serves as row index to  the large array  troops.  So finding the name of  row (-1) is an impossible task.

  I found useful the recent messages    http://imageshack.com/a/img924/2520/pwGyfh.jpg

  I won't have time to chase quests today.  I need to make a build for our twitch streamer tonight, but that means doing balancing and more focus on fixing the placement on map of bandits and villages etc.  This is also a good time to move lords so I can hot patch later a v135 giving kingdom patrols and scouts and reducing lengths of time stuck in loops (which cause fast movement "stutter").  I reckon he needs about 2 weeks to come up to speed in terms of really understanding what is different about Phantasy 2017.  I've asked him to avoid for now Necros as I haven't done squat with them but maybe on another week I can hot patch something about morale and troop limits for skeleton and zombie skins (and block normal players from hiring them as how would they control them?  They shouldn't even be allowed to listen to formations commands without a player necro giving some communications path).  And  in my opinion, player necros maybe need to be (only) evil clerics, not mages, if they want to multi-class.  In all cases, they are Guspav's problem, not mine.  His pace is fine by me; he can update them if he has a calling to do so.

    I'll take responsibility to adjust skeletons and zombies to not get buffs from food/drink, not to consume food/drink, to have reduced morale changes (good or bad), and to cost 1/2 normal against party size for necro flagged players.  I'll take responsibility to block hiring troops with 2 or more difference in alignment (so neutral can hire evil, evil can hire "extra evil" (which is very rare), good can hire neutral but not evil (and good itself is rare).  This should also apply to companions.  But those are v135 changes, as they can be hot patched without burning the save game.
I'd like to preserve v134 saves a little longer than usual, or open a parallel 140 series to keep it straight what saves are never going to be compatible.

  It does need to put something to block multi-class "I want one of everything".  Just not today.

  I should also be able to hot patch Elven armor as it finishes getting remade at our (newly joined) part time modeller.  He does really high quality work.  After retooling Elvish armor, he is making 5 items for me then a special mount, and if he ever has loose time after that I asked for female armors.  I'll update my schedule so the next week is better laid out for planning.  He's asked me to be more "organized", as if I don't plan enough for calendar schedule purposes.
 
gsanders said:
I'll take responsibility to adjust skeletons and zombies to not get buffs from food/drink, not to consume food/drink

Could fix that real quick by adding "Blood" and "Brains" as food for undead/devil troops and tell people to roleplay properly by only buying those for their evil armies  :fruity:
 
adrakken said:
gsanders said:
I'll take responsibility to adjust skeletons and zombies to not get buffs from food/drink, not to consume food/drink

Could fix that real quick by adding "Blood" and "Brains" as food for undead/devil troops and tell people to roleplay properly by only buying those for their evil armies  :fruity:

  I have considered making higher tier undead require frequent kills of the living in order to be considered "fed", but this brings into question garrisons and in general I'd probably be dis-invited to Church, not that I show up much.  I'm not personally fond of undead as an option for players, but they make fine villains.

  I'm willing to buff them up just to make them better foes, not to encourage impressionable youths (whatever those are) to daydream of becoming liches.  They're supposed to daydream of marrying kingdom ladies (or kingdom lords, I really don't care what their orientation happens to be), who preferably have some better female gear "soon", or flying on their pet flying mount -- which is a very real possibility by Thanksgiving or so, although it sort of exists in the mod now.  I understand some people really "need" to be into legions of skeletons to keep them company, I just can't get excited about them.  I will make skeletons dodge better very soon, if that helps.  But as for eating captives and such; it may yet happen.  Just not "soon".

  - GS
 
ahh I actually meant with food that can be purchased via the market.

Again, just for roleplaying purposes, so it makes sense for them that their undead is being fed with food.
 
Received a tester note today:
Anyway, there's what I came across today (it's not much):
- reference materials -> all merc and other troops - individual pages are named after factions, not types like undead, demons, special units etc.
- phantasy factions now have some previously native lords, which is probably intentional... however, the names are still the same, and in case of Necros and Drows, even the titles; also, Elves have 2 lords named "Heru Kumipa"
- mage robes and hoods seem to have 0 magic modifier (at least the description says so)
- spiritual weapons are now sorted by category (throwing and melee) in item_kinds.py => it's impossible to switch to melee mode
- probably the new exploration feature causes most attempts to access a settlement to "fail" - it returns you immediately to world map... the following try works, however, after some time it resets and you have to click twice again
- images in game_menus seem to be scaled up => it's difficult to read the text
- mage lords have orc map icons
- as a mage, when entering pretty much any scene (including battlefield) I got some random spells and possibly a buff (haste) - it's probably caused by a trigger that handles NPC mages and doesn't exclude player from this spell loadout randomization

I probably had more to report, but the game froze (first at tournament, then in battle) and I had to force-reset my PC, so most of my notes were lost.

  The spiritual weapons needing to be kept together thrown and melee versions is my mistake.  I had separated them in preparation for a future change,
but thinking about it I see I'll have to be more clever.  Worse, I see that I'll need to replace v134 savegames with a save game destroying v135.  That is a pity.
It means Rand118's twitch session won't yet be safe from overwrites, although as a "state of a bleeding edge preview" it still is a useful snap shot peek behind the scenes of Phantasy 2017 "work in progress".  It's also more reasonable to let a twitch session sneak peak serve the purpose of "open house" (which is to confirm the mod isn't just vaporware / hype), while delaying a public release for a cleaned up nicer long term  deep savegame capable version - even if it released say Thanksgiving instead of Halloween.

  Game freezing is of concern; at a tournament it shouldn't have been using spells so the issue isn't as I thought spells like Acid arrow (the ONLY spell I touched).  I should look at tournament more so I can see if spell handling is even turned on in tournaments; if off it provides a useful means to test where
the real problem comes from, as spell handling for clerics and mages adds a huge number of scripts that go off by timer constantly and which I haven't really had time to go over other than remove compiler errors.  I could remove spells from one mission_template like tournaments if spells are ON and then see if it can still hang, and if so that reduces the amount of code to look at.  Next I can substitute a generic mission_templates, with magic & cleric spells off, and just have you watch a pure battle with the same troops but no magic, and see if that hangs. 

  To be honest I have a hard time getting a hang; it's happened before, but I don't get them often.  It would be easier to solve if they happened to me even once per 10 hours.  My PC is considerably stronger than usual.  I do get a memory error message when I close Warband completely; I had assumed this was some sort of Nvidia driver error as I haven't been updating Nvidia driver (I removed the Nvidia "Gforce Experience" from auto-running on my PC, as I hate to let anything launch itself at system start.  I'm fussy about my PC waking up quickly and with minimal software interference.)  But your system hung more than mine.  It's possible I have more Warband crash resistant settings than you do.

  Go to Control Panel in Windows, then Nvidia Control Panel, Manage 3D settings:
    Optimize for Compute Performance:    OFF        <-- this used to be called "Thread Optimization" in older Nvidia drivers, starting with GForce 400 series
          Leaving this at ON should reliably hang Warband about 3x as often -- ANY Warband mod, not just this one.
          People used to kludge around this by Going into Warband (BEFORE starting any mod), Configure, Advanced,  Force single threading = ON
            but actually it wasn't needed.  What they were trying to force was NVidia not caching threaded operations coming from DirectX9

  Obviously, I have plenty of work to do.  I STILL think I can pound it out, whether it needs the over-optimistic Halloween or a pessimistic but realistic Thanksgiving.  I also still hope Rand will give us even a 90 minute preview of new features, just so we can collectively see that, whatever the birth pains remaining are, SOMETHING actually works.  He had certain issues in his play through that I feel are solved now:
  1) Couldn't fight on behalf of bandits when it was convenient to change his reaction score with them - now can fight for either side if he comes across a battle already in progress.
  2) Couldn't sell prisoners at his own castle and had to run far to sell them.  Solved with Diplomacy OSP - has Constable to sell troops to
  3) Constable training for his castle guards (and the training is slightly buffed in Phantasy 2017)
  4) better economy / more trading / better price and resource allocations for raw materials / more goods at villages / enterprises pay better
  5) less OP magic starting with build v134 - more base troops have Magic Defense 1 although horde troops like Orc, Skeleton, Zombies are still Magic Defense 0
  6) Wife as a Companion (which was tweaked v134 build to allow more personalities to join the party).
  7) There are a huge number of other changes which I feel are more significant than just "quests and tournaments aren't working" (YET)
        but it's true the mod isn't yet a finished thing.  I feel it is better off than it was June 2017 but I may be biased; Guspav didn't seem as pleased as I am
      with its progress (or maybe he just felt it was a long time from being finished - more so if all coding was part time than at full time pace).  I'm not really
sure he likes any of my changes.  But he may just be really quiet and shy in person.  I have switches to turn OFF Rigale messages and activites but v134 had forgotten to toggle them on behalf of the player, so the cleanest experience is as follows:

  Select "Change Phantasy 2017 settings:
WSxwp.jpg

  Set THESE options exactly like shown:
oxuLW.jpg
  Removing Rigale enable is obvious, but setting exploration mode from "passive" to Disabled blocks the mapping and exploration messages, the exp on reaching a location, lost in woods quest and status changes, the discovery (and insertion/placement) of new temporary harvest parties, which MIGHT cause issues when they are timer driven removed from map sometime later (and I haven't had this happen to me, but its a theoretical possibility).
    Turning off epidemics is obvious enough; it likewise turns off a significant opportunity to make some early game money.
    Finally, leave ON Diplomacy "Terrain advantage in autocalc battles" as starting with v134 build, autocalc now understands mages and clerics in the terrain
        calculator, and buffs slightly their impact in sieges (and raises archers from 1.2 to 1.3 previous effects during sieges only).
 
One major problem: I get constant CTDs in battle scenes. No message except CTD and "Progam stopped running". So I don't know what causes it.
 
imyungdae said:
One major problem: I get constant CTDs in battle scenes. No message except CTD and "Progam stopped running". So I don't know what causes it.

  This is with v135? or v134?

  I was suspicious of background activities like 24 hour checks for trade fairs running at the same time as the battle causing these, but I'm open to anything else.  Excepting a battle in village center (such as fight bandits) the battles haven't changed in a good long time.  The village center change was just to enable flying, which isn't a core feature right now.  Flight can't possibly impact battles not occuring within a village center mission, as thats the only mission with support for flying linked in.  I was suspicious of Acid Arrow spell, as that is the ONLY spell touched from Guspav's August build; in general battles are the same now as they were 2 months ago -- its everything else that changed, outside battles.  I was more suspicious of Nvidia driver changes (such as the multi-core "support" default in the driver as my comment previous post for Nvidia control panel adjustments from Nvidia defaults (which otherwise needed setting single threading in advanced options, but its not really needed if you disable multi-threaded optimization at the GPU, which is where the problem is).

  I seem to be more stable than other people but I did have a crash also, and its strange because I turned off many background routines when switches are set to disable Rigale settings.  Other than Rigale, the background processing is almost the same now as it was in early September, which seemed clearer.

  I decided that most likely the quest corruptions were from some task walking on reg0 after script_get_quest runs but before the next line (in a single threaded system) assigns reg0 to $random_quest_no.    Since there are a huge number of tasks using reg0 I changed it to use reg8 just now, but maybe we all have lots of CPU cores (I have 4 with hyper-threading on, so 8 threads) but Warband runs mainly 1 core and sometimes 2 cores.  It seems to get into trouble with 2 cores, but in the past I always crashed when using Nvidia's "latest driver" which kept overwriting my change to turn multi-threading support OFF for Warband.  Now they do the same but have TWO options to disable:  "Optimize for Compute Performance" and "Threaded Optimization". Turn THOSE to OFF, if you have Gforce Experience updating your drivers each week.
STDtv.jpg

    I have an older driver from Win 7 running in Win 10, so I may as well update and see what happens.  Its about time for Win 10 fall update anyway.  I'll hunt carefully in all the simple_triggers and triggers for any use of reg values that might be walking in the background on one core while the foreground uses the other core to run scripts, dialogs, and menus.  I blame Rigale but actually any simple_trigger task could walk on another part of the mod without forcing single core support (and you can try that, last, in Warband: Configure: Advanced: force single threading = ON
  I updated to the Oct 9th 2017 WHQL Nvidia driver for Win 10 Pro x64 international, and have the Win 10 Fall creator's update installed as of a few minutes ago, so I'll see if I have a new issue for stability or not.  I use an Nvidia GTX 950 with 2 GB of RAM and my CPU and GPU temperatures never hit 60 C under maximum load, so your laptop may not be an identical environment.  (I once had some user cry to me Perisno smoked their laptop, but eventually I smoked my laptop too.  Hmm I bought a Cooler Master Notebook cooler with a huge fan and plastic slits to blow cool air from underneath but they removed the cheap one I bought (and it was like $19 USD) and all they have now is a 30 euro one that seems a little worse (but aluminum not plastic so its stronger) .  I really did melt my laptop it was pathetic  :smile:  After that, blowing air from underneath lowered GPU temps inside the laptop by 10 to 12 C, which is a huge change.  I strongly prefer desktops for real gaming...
 
My desktop PC is like 5 mor more years old. so it sucks gamplay wise.

But I play on my much better laptop and I doubt that videocard would be the issue. I can play gekokujo, AD 1257 and other mods on 300-400 battle size at once without crash. I could even use guspav's version with that setting. Now I lowered battle size below 150 and I still have crash at siege (at least at  Derchios castle and at some bigger battle scenes). I can mange zombies but when i join with some lords, it crashes after a while.
 
imyungdae said:
My desktop PC is like 5 mor more years old. so it sucks gamplay wise.

But I play on my much better laptop and I doubt that videocard would be the issue. I can play gekokujo, AD 1257 and other mods on 300-400 battle size at once without crash. I could even use guspav's version with that setting. Now I lowered battle size below 150 and I still have crash at siege (at least at  Derchios castle and at some bigger battle scenes). I can mange zombies but when i join with some lords, it crashes after a while.

  Warband: (Don't start Phantasy yet): configure: Advanced: select  "Force single threading" to be ON and then try it.
  Phantasy 2014 didn't have Diplomacy embedded in it.  There are a very large number of scripts returning values in reg0 in Diplomacy; with multi-threading some other script or function on one core can try to put a value at reg0 that another thread also was writing to at the same time.  When we read the code as humans we read it as if only one thread is active; diplomacy exposes a greater risk in multi threading that wasnt there earlier.    I dont actually care about how it worked before 3 years; I care about what day it started crashing here. 

  Just sit tight for 16 hours and I'll put compartments in all the background tasks to turn off and on layers of the game, such as magic, everything added since end of august, and different weak points I have in mind so you can test pieces of the mod in isolation from all other layers.  This way I dont have to shotgun 5 different compiles; we can do this elegantly and test just one layer at a time to find where its breaking.  Have a little faith with the panic.  I dont work late at night so you need to hold tight 16 more hours then panic, K?  Have faith that I'll bang out a version just for testing that really lets you isolate layers, instead of just guessing blind in the dark.  There is science, when the shotgun approach fails.

  - GS
=======
09:30 Fri edit:
  "I can manage zombies but when i join with some lords, it crashes after a while."

  This just came to me:  maybe we're looking at the wrong layer.  Although there are layers I didnt add till recently, and I blamed them for recent issues, there could be more than 1 problem leaking onto test sessions.  But the thing that zombies don't have that faction lords DO have is this: Magic Defense.  An underlying issue with Magic Defense handler would have been seen mainly with lords parties, where some of the knights had high magic defense.  Also with Drows.  But just about everything else had 0 magic defense as Guspav handed it to me, so the magic defense handler was skipped.  Starting with v134 and certainly for v135, darn near every troop has Magic Defense of 1 or better, meaning EVERY agent has magic defense handler used for spells that even have a magic defense possibility (some spells just blindly affect the target).  This small change on my side may have huge changes in battles, IF the original handler was weak in any way.  I just sort of assumed that the magic was "working" fine and focused on other areas, as comprehensive magic overhaul would rip the mod apart for some time and I figured I should eliminate all other sources of instability first before starting something that was likely to have glitches for some time.  But maybe it is already glitching just from added percentages of target agents having magic resist.  I'll look at that today as well, and build a switch so that later as magic resist is replaced (which was planned anyway) I can turn it on and off as glitches occur.

  I think I can in the next 1-2 weeks isolate all the sources of corruption, even ones happening from multi-threading (which did not used to occur in earlier Warband versions, but MIGHT be a "thing" for v1.72.. or might not).  Even if its not possible in Warband, its a good practice now to plan for true multi-threading for Bannerlord, and in any case the real world evidence is that registers used to return values needed for quests were getting walked on, so the quests had garbage in their contents.  I see evidence of this in many places, so I have a plan to reduce each script's possibility of stepping on regs needed by another script as much as I can, but there are hundreds of scripts running and all of them use essentially the same regs to pass results.  This results in serious turbulence (for lack of a better word) in the real world results, even though the code seems perfect at first glance (not taking into account more than one level of code executing in real time - in 3 or 4 dimensions instead of a flat single threaded view of the linear code execution like Diplomacy and every other OSP assumes).  But for once, you have the right idiot savant running the show.  For now.  I can do this.  Just have some faith.  And give me some time, because its a big problem.  I know WHAT to do, but it needs a lot of effort to pull it off.
 
  Looking over mission_templates, which is MOST of Guspav's magic system (most cleric spells, single target magic spells, special mounts, sneak weapon damage, a (disabled) brawler/open hand damage system, NPC spell casting in general)...

  Hmm.  There would be a high number of routines that fire at the same time as he had it.  If these took long enough I could see the battle crashing, without me needing to have any exotic background task walking on reg0 (which by the way holds weapon doing damage in many of the battle triggers).  I made notes for each magic trigger he made (there is a large number of them) and re-timed them to not overlap, as well as put each one into a specific category that can be toggled off and on for testing.  I can't say all of them but enough of them need re-writing to not overuse "try_for_agents", which Guspav called somewhat casually all throughout mission_templates.  I prefer to use a modified list handler, with some externally managed garbage collection to reduce overhead, but failing that I'm thinking that for example I dont need to do a try_for_agents call every few seconds to check "do YOU have a quiver of plenty?" of each agent in a battle.  I'm guessing most battles have 0 quivers of plenty; if one was found, it would be more useful to stuff that agent's number onto a list of "peculiar agents" that was populated once only at time of agent spawn.  Not quite at minute intervals the list could be groomed to remove dead agents and otherwise not touched very often.  But even that requires re-making the list handler to skip dead or erased entries, or to keep entries there but have to keep checking "are you dead yet"? What I DON'T want is the list handler to waste time removing entries, as it right now burns huge time remaking the list.  On each separate entry removed.  Better to copy the list full of holes to another list so as to purge all the dead from the list in one pass, and to absolutely not do that at 60 second intervals.  59, OK.  61, fine. 57 or 63, some risk of coinciding with a different timer and making a slight stutter from the combined peak of CPU load at that moment... But that's my problem to worry about.

  Then I could have every "try_for_agents" check asking about "do you have a Javelin bag of plenty" that actually found  peculiar agent with such a rare item to be added ALSO to the list of peculiar agents found, and now there's one that has a quiver of plenty, another that has a javelin bag of plenty, and I didn't burn two lists.  Instead of "try_for_agents across every last man, cow, horse, and so on in a battle, I just ask the list "hey you two, anyone in here got a quiver of plenty?".  I do have the burden to walk through each member of the peculiar agents list (are you alive? Do you have a bag of plenty?) but that is many times faster than asking 300 to 500 agents the same question every 15 seconds when at best 1-2 will answer "Yes", and its the same 1-2 (if they're even still alive).  That's an example but there were at least a dozen such time wasting loops overlapping.  I think a little time spent re-building those would make those parts of battle more smooth.

  A less extreme case:  there's a try_for_agents check looking for paladins, once per second.  Every freaking second, every last agent is asked if they're a paladin.  I suspect none of them had battlefield promotions to suddenly become paladins (although don't tempt me); there could have been a list of clerics and cleric-like agents (maybe with paladins and necros added to the list when each was first spawned in battle).  Now if between the two sides there are 60 clerics and cleric-like (they all of them manipulate undead/healing/cursing/some sort of cleric activity)... well, so now I'm checking 60 instead of 300-500 agents.  Its not as obvious a savings, and not quite each minute there is the risk of a pause as the list is cleaned up (hopefully not at the same time as some other list, like magic users for list 2 and peculiar agents for list 3...).  But overall, each and every cycle that would have been asking every agent, living or dead, "are YOU a cleric" (and assuming the same agents answer the same way each time)... well, time matters.

  Now for something that doesn't fit into a list well -- dodge recovery.  If after a dodge there was a timer written to the target that dodged, more time is wasted putting them on a list than using try_for_agents to change that timer.  But I don't actually HAVE to run that try_for_agents check every second.  If I wanted say a 5 second cool down, but only updated timers each TWO seconds, subtracting 2 from the cool down value and setting negative values to 0, I could do that with 3 updates rather than 5, and risk fractional stutter each 2 seconds than each 1 (and thus bandwidth overhead was half the impact).  Even better would be using fractional seconds -- 2.3 second timers or 1.9 second timers are superior to 2 second timers, because a 2 second timer overlaps a 4 second timer, so at 2 seconds into the battle I have to spend time from the two second timer; but if there is a different timer going off at every 4 seconds, on the 4th second (and 8th, and 12th, and 16th...) I have that two second timer, AND the 4 second timer, and maybe half the time some 8 second timer routines, plus all the 1 second timer routines ... ALL at once, making a bubble of pause. Make that pause long enough and DirectX calls and other routines time out.  Frame rates drop, and users complain.  And I squirm saying but but "it's not my fault!" Except I don't have that luxury.  Even when its not my code.  Its assumed I'm gosh and all of it must be my fault.  I'm just the backup modder.  But I'll run with it, because I think right now its something I can do, and should do, and this is exactly WHy I think it needs doing, and with (or without) your cooperation, it will happen.  Hopefully pretty darn quick.  But talking about it isnt coding, so off I go...

  I can't be sure those were killing battles, but I can be sure that for large battle sizes, it was dangerous and not needed.  I suppose for 50 troop battles it doesn't matter -- waste as much time as anyone likes, a modern CPU keeps up.  But it matters in the 300-500 troop battle size.  I can't imagine it not seriously stalling, as its written.  Worse, it could be easily enough fixed.  And it looks like, having made that complaint, I'm on the hook to do so "soon".

===
  here's one:  every single attack that hits an agent, no matter from what source, first waits for 38 (plus 2 just now added) separate checks to see  if the striking weapon was stealthy, and if so, then wait to check more stuff like if the agent taking damage was facing away from the damage dealer.  A nuke from across the map still waits 40 instructions checking on whether that weapon was stealthy.  If I felt like re-organizing items (again??) that could have been 3 checks (is_between  some items ranges  + 2 layers of checks to see if that part of the code was disabled or live).  3 versus 40, for EVERY SWING that connects.  Now lets see 500 troop battles...

  every 0.2 seconds two try_for_agents go off, first looking for mages and when one is found adjusting their ammo according to remaining spell points, then the second is a NEW try_for_agents looking for clerics (since the same agent could have both enabled in theory).  I adjusted the spell mana bars so that if dual classed, the magic user mana bar shows instead of cleric, since in sieges I'm more interested in area effect spells.  But that is 5 times a second, two needlesstry_for_agents.  So is it worse for v135?  Umm, I made more clerics out of nuns and monks.  Low level novices and adepts are flagged mages.  Before they were just given specific spells as weapons and treated differently.  That's a separate concern.

  Don't blame everything on me.  But having said that, Guspav is STILL a genius.  His code just needs a little bit of touch up and it will hum.
No one person can do this alone.  Not me, not him, not a team of people each pulling their own direction.  We each do what we're called to do; everyone has different talents.
 
I have to agree that you and guspav added so many new elements into the game that this mod could be a standalone DLC to Native lol. Impressive work, and every long message shows this to me. I like to read your long posts because it helps me understand how this game works.

About single threading... I tried that but it still crashed. So i dont think thats the problem. Im now setting up twitch so i can show you what exactly happens.
 
imyungdae said:
I have to agree that you and guspav added so many new elements into the game that this mod could be a standalone DLC to Native lol. Impressive work, and every long message shows this to me. I like to read your long posts because it helps me understand how this game works.

About single threading... I tried that but it still crashed. So i dont think thats the problem. Im now setting up twitch so i can show you what exactly happens.

  Well could you ALSO make a twitch where something works so I can share THAT for people that want to give up on this mod?
Because, I honestly think it can be salvaged, but I agree it needs more work.  The more I look at it, the deeper I see I need to make fixes.  Anyway, I don't want to see v135.  I probably made Guspav's entire magic system 33% more efficient just by changing timer numbers, but it needs more work than that.    Wait 10 minutes and show me v136.  You can throw away v135.

  And set a small battle size, like 80 for the moment.  He has a HUGE number of wasteful routines and I dont think anyones small PC could handle it.  I never noticed because my PC is a monster, and my software environment is super clean.

===
OK Imyungdae, just for you I put a much cleaned up v136.  It's POSSIBLE some quests will work now also, but it looks like the reg0 getting squashed happens all over the place so it may take some deep edits in the next week to solve those.  reg0 is used by darned near everything, including Guspavs magic.  This may take "real work", whatever that is.  Hey just so you don't give up on me, I left some easter eggs in the tester folder.  You can see my first job, back when I was somebody.  I was their first non stock owning hire in '83.  How's that for life?  Back to what matters though: this darned mod will get in shape.  This I can swear to you.

- GS
===
Obviously it needs more work.  OK I'll be busy the next two weeks ripping it apart and gluing it together differently.  It was working fairly well for a while but I can see it was never meant for big battles in the shape it was back in July/August.  Its still not stable just now.  Human Clerics ran pretty well, but my Elf magic user died before I could finish making his stats.  I'll look at it and try different settings to isolate what works and what doesn't.  Thats the whole idea of this build...
 
It's a "next week" issue.  v136 isn't very stable.  It crashes once an hour for me, and even crashed fighting the lone bandit.  But I've had plenty of fights that DIDN'T crash, and just now it died I wasn't even in a fight, so there's some background task killing things.  Perhaps its bandit spawns, perhaps its something else.
I'll chase it down next week.
 
imyungdae said:
https://drive.google.com/file/d/0B-v8WYOJ9OaeX0FWaTEtU2ltUTQ/view?usp=sharing

21000 damage WTF???  :grin: :grin: :grin:

ALL of these, including most of the hard crashes, are the same problem: regs are supposed to be returning values that instead got substituted with the returns of other scripts.  These are issues that were inherited not just with the base diplomacy but every add-in I added didn't really try to save reg0 or most any other reg.  Of all the OSPs, Diplomacy tried the hardest to save regs, so what little worked in the past should thank Diplomacy.  Some of these trash walking calls occur every 0.1 hours, planting them in the middle of battles, where they continue to trash whatever happened to be expecting the sole use of that range of regs. I'm very god damned sorry, but you =just have to wait a few days.  All of the errors turned in recently are all the same cause.  Stop testing for a few days.  I'll tell you when _I_ think the issue is closed, and then you can see if you really found something new under the sun.  I'm not digging through the code uselessly or blindly.  I have a good idea of what I am doing.  Just fricking wait a few hours so I can do it.

The other source of in battle crashes are time outs from too many calls to cycle through every agent (living or dead) in a battle, again and again (perhaps 20-30 times!!!) back to back as different parts of Guspav's magic code searches for really rare events.  All of that was added probably in the last 3 years.  You can reduce the battle size for the time being; you probably can't have > 50 right now with your PC; I have to set my much faster PC to 80.  It won't have to stay that way for more than 2 weeks. 

  In battles, reg0 is supposed to be the weapon that hit you, reg1 is supposed to be agent using that weapon, and some other reg held the damage amount.  That reg probably got walked on by a background task; a number like that could be the date or time of day.

  - GS
 
Hm, seems like that reg0 is a major part of the game...
Could you please explain me what exactly is that? I always like to read if there's coding involved.
From what you told me until now it seems that it not only affects battles, but other things as well. But correct me if I am wrong.
 
imyungdae said:
Hm, seems like that reg0 is a major part of the game...
Could you please explain me what exactly is that? I always like to read if there's coding involved.
From what you told me until now it seems that it not only affects battles, but other things as well. But correct me if I am wrong.

  with this background, http://forums.taleworlds.com/index.php/board,12.0.html
  and next this    http://forums.taleworlds.com/index.php/board,12.0.html      <-- wow this is really good!
    you'll see in sections 10 and 11  regs being used to pass results of scripts. 

  Not every script makes a result, but when it does, it often has no idea where it was called from or why, so I doesn't know where to stuff
values that may be needed after the script returns to wherever it got called from.  Instead, a register  (a special global variable that is supposed to be in the range [0..63]  is chosen, with nearly every script since the beginning of Mount & Blade choosing "reg0"  (which can also be called "reg(0)".  This is fine, in a single threaded environment.  Mayhem begins when someone tries to increase performance of the Warband engine by working more than 1 thread at the same time.  Unlike local variables, writing to    reg0  from ANYWHERE will ALWAYS WRITE TO THE EXACT SAME LOCATION.  This is great when you don't know where to look for information to always have some place to read from, but if one is writing "partyID for Quest" at the same time another is writing "Fireball damage to the current agent" both to reg0, which one will be given as a result when 50 milliseconds later some foreground task now wants to READ from reg0?  Which one does it get?  The Quest result, or the battle damage, or what? Maybe it gets the number of cows to remove from wandering away; maybe it gets the nearest bandit to a party, checked every 6 minutes in game.  I bet some battles last 6 minutes... ummm.. thats a collision, even if it doesnt seem like it should be.

  Alright, so in the past I just assumed it worked, and I see it sort-of barely worked, like driving a car in Bulgaria when not a person on the road gives a hoot about the color of the traffic lights or speed limits or using a turn signal.  (And thus I hate local drivers).  I guess I'm a fussy foreigner.  But I can probably clean this considerably in another 3 days.

  ===
I could put a hot fix v137 fairly quickly that should work with v136 saves but it can't fix damage already done within the game, so safest to restart games that aren't deep.  I'd be interested to see what effect (if any) toggling off and on "force single threading" under advanced configuration in the Warband menu, with a v137 build.  I found quite a few places where the most recently added game layers would have walked on regs that obviously weren't yet stale enough to be discarded.  I think the foot print is very different now.

I could hold off on re-ordering stealth weapons into the martial arts category for a bit; that would eventually solve some battle speed problems with Guspav's code while giving a natural order to how different weapons qualify for "stealth" status in the first place, while suggesting new stealthy weapons in the future.

  I may yet hit my internal target for "open house" broadcast of "the state of Phantasy" for Halloween and a public release by at least Thanksgiving.  I'll be busy (making peace with my family on a London tour) a few days in early November and if I can't come up with money I need to give up this effort and get a "real job", since I'm the only one in my house hold that thinks this is a valuable use in any way of my time.  I should release something, anything with a donations box.  But I think we could have a broadcast one way or the next if the mod were stable.  Obviously it needs both "stable" and "runs well in mid sized battles", which are two completely different problems at this point.  But i may yet nail those by this friday, giving me a few days to prep a broadcast through one channel or another.  It's not like there's a shortage of equipment.
 
v137 issues I've found in my own test:

1)  Native faction villages offering troops were showing a mesh for the faction's (male) villagers but no writing as to what sort of troop is trying to join.  Once you leave the native factions, OR a female troop shows, troops display normally, even at the native faction.  I'm thinking this is something to do with prejudice testing, and there's some sort of mismatch in terms of the village not liking something, in which case the message changes.  But it could also be too many registers cleaned up when passing between a script and game_menus, so I'll need to look at it.  The Diplomacy source I used already had one instance where documentation didn't match the code, but regs were needed that the documentation said weren't used... so I should work backwards.

2) My Female test case wasn't offered any vassal offers even while sitting at the Elf forest, where a Queen is in charge.  Instead  I was still getting female party members telling me how if I was a man I'd be getting vassal offers, meaning some check would have already offered me something.  I saved that char and I should experiment with it to test getting vassal offers as I re-do that section within Dialogs.
  FIXED  simple_trigger #45  Verified for v138
0FPOR.jpg
3KPjw.jpg
Zilxq.jpg

3) I made a cleric, earned money (without cheating) via entertainment skill, levelled up and bumped up intelligence, eventually taking the mage guild quest to become a mage (and get "somewhat" free mage gear), bought a mage staff, bought my first spell, bought a spell book, copied spell scroll to spell book, went to a fight and ... couldn't open Mage spell book.  Could open Cleric spells.  Decided I have the tools to chase this down,
made this observation at Reports: Reference material: View all Lords (including yourself), left arrow to flip to the last page, select my player character and see this
bBxgl.jpg
  which tells me  "slot_troop_is_mage" for "trp_player" is not equal to 1.
  So I should consider why the quest didn't set that value for me, but did give me items.  <-- FIXED for v138

4) Tournaments aren't quite as broken as first reports claimed; they have a message, but the message is fairly clear.
CPVwK.jpg
  this just tells me there was an issue handing weapons at the match, which is easier to hunt down.

5) Camp: Actions: Actions 2nd page: Review special skills and abilities: (second page) "Strategic Skills": 
      should ADD  "Exploration"  here

6) Actually, Rigale seems to be a skewing crafting builds towards more fails than it needs to.
    I should up the success roll by 2-3 out of  1d20; I had lowered it by 5 and its too severe.
----------
  Spent most of the day with 0 crashes in v137.  It looks very stable so far.

Day 3?
  I was able to black screen of death after killing cows to get hides with skinning skill, but haven't been able to reproduce it.
Was anxiously making leatherworks to make a custom heavy crossbow with...

  7) I saw the crash Guspav described last March for sieges using towers.  That's interesting, because the tower finished moving and it looked to me like the crash happened exactly during a reinforcement wave.  I'll have to watch that again slowly.  Moving the slider for battle size from 80 to 120 and this time the battle worked.  I also removed Anisotropic filtering and lowered the video settings.  I expect what is happening is still the inefficiency of Guspav's in combat code and will resolve itself once combat is better optimized.

 
I meet a very small bug. I want to play swadia. I begin in swadia land because it is easy to fight looters and forest bandit. swadia is at peace with everyone.

I ask a task to the guild master in praven who propose me to stop the war with nobody. I don't know if it is a mod's bug or a game bug.

I have a screen of the dialog. But I don't know how to post it on the forum. I don't post a lot.
 
Back
Top Bottom