1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Man in Black's Journal

Discussion in 'Dev Journals' started by The Man In Black, Jan 19, 2010.

  1. The Man In Black

    The Man In Black Administrator Staff Member Administrator Moderator Developer RiP

    Jul 9, 2006
    I suppose if I'm going to be working again I'll keep a journal. Besides, Thothie says it may inspire some more people to take an interest in the code. Hey, whatever makes my job easier. I'll include pretty pictures wherever applicable, but, sadly my job doesn't get the same photo opportunities as Thothie.

    To-do list:
    -Get FN File IO 2.0 working. This is my highest priority this patch. Version 1.0 had a problem where, if FN became disconnected at the right time, we could lose messages going either way. I thought of a solution involving queuing files (for write) and looping request messages (for read). When I got all the code written there were many problems (as always), and we were unable to include it with the patch. Many doors are opened with this system, including a full banking system on FN.
    -Remove inability to walk while loading a tome
    -Fix clearstore and other store-item abilities
    -Make a temporary fix to stop servers crashing FN
    -Redo how armor effects player submodels. Thothie changed the player model to work better with things to come and to save space. Sadly, the m_WearModelPositions doesn't work the same with the new model. In addition, Thoth wants the ability to have more than just on and off for submodel parts, so I'll need to do some new algorithms for calculating what submodels to use.

    Currently working on:
    Fixing the armor fix. The variable for keeping track of submodels on a player (body) fails to send to clients. I hijacked what I thought was an unused variable to pass it instead, but it turns out that it wasn't unused. Now, I have body trojan horsing onto another via:

    renderfx = ( 256 * renderfx ) + body;

    and decoding on the client as

    body = renderfx & 255;
    renderfx = renderfx / 256; (integer division)

    It seems to be working, but I need to get a multiplayer test up, plus try a few glow shells and what-not.

    -Script command 'giveexp'
    -FN Date function. Used for a security fix. Servers will be able to read the FN date.
    -FN Security fix with map verifier
    -Create (half) the system for shops to ask confirmation when selling an item with too high a level requirement
  2. The Man In Black

    The Man In Black Administrator Staff Member Administrator Moderator Developer RiP

    Jul 9, 2006

    A lot of crazy things have been going on, but I've managed to put together a few changes. Most notable of which is this:

    (Models are placeholders)

    Another step forward to having 3 playable races
  3. The Man In Black

    The Man In Black Administrator Staff Member Administrator Moderator Developer RiP

    Jul 9, 2006

    Back to doing some work! Outside of the usual bug work, I've had two large changes:

    1. Over two years ago I put into place a system to stop players from gaining massive amounts of exp from monsters when the monster continually regenerated itself, got back up off the ground, or was hit with one, final, large blow that took the damage done WAY over the Max Health. I never liked the way I did it, but it was something quick that fixed a problem. I always intended to fix it, and now I have! The differences:

    Bob is fighting a 50exp monster with 50 health. He has done 45 damage with his dagger, but now moves in with his sword and deals another 45 damage in one strike.
    Originally: Bob would receive 45exp for Small Arms AND Swordsmanship (90 exp for that 50 exp monster!)
    Current Patch: Bob would receive 45 exp for Small Arms and 5 exp for Swordsmanship (50 exp, but not fair to Swordsmanship)
    Future Patch: Bob would receive 25exp for Small arms AND Swordsmanship (Both skills did even amounts of work and deserve even amounts of exp)

    Since the damage distribution is rounded, it's possible to go above the Monster's exp value, but not by much. I think this is a much better solution than before.

    2. Healing exp! It has long been complained about that healing other players isn't beneficial to the healer. Why be a cleric when you aren't getting anything? The most obvious problem with why we couldn't add this is because of how exploitable it is. Players could jump off a cliff and have someone heal them all day, or stand in front of an orc and do the same thing. Well, I've devised and coded a working solution to this problem. There's no easy way of explaining how it works code-side, but I'll try to put it in plain English:

    When healing Player A for damage dealt by Monster A, Player B can only gain as much healing exp as Monster A is worth. Once all of Monster A's exp has been "taken," no player can get exp from healing Player A until another monster damages him. Of course, if Player A heals Player B from Monster A's damage, he can gain the full benefit of Monster A's exp until it runs out on Player B, as well.

    This will most likely wait to be implemented until the title system is out or something is done with magic, as this would wildly throw off the balance of magic as is.

    That's all for now!
  4. The Man In Black

    The Man In Black Administrator Staff Member Administrator Moderator Developer RiP

    Jul 9, 2006

    Finished a system to make arrows/bolts selectable via the same interface as tomes and weapons. Choose an arrow/bolt and, assuming you aren't trying to fire a bolt out of a bow, it will use that stack of arrows. If you run out, it goes back to normal mode (using the first available ammo until you get back to wal-mart arrows), or you can reselect what arrow you want to use. You can also choose to use the infinite generic ammo.

    Working on the code side of Polearms. Polearms correctly load from a file that doesn't have them (was a big concern). They also show up on the character sheet.
  5. The Man In Black

    The Man In Black Administrator Staff Member Administrator Moderator Developer RiP

    Jul 9, 2006


    For those who can't tell, that's both hands attacking at the same time. I've rigged it so both hands can be used at the same time. Exp will pass properly to both hands. And for those with sneaky ideas out there: No, you can't hold up a shield and attack from behind it ;-)

    I've also was able to fix the Undeletable Character bug. Seems some code went missing on the central server. As Thoth mentioned, since it was just an FN patch, it's already been applied.

    The difficult (well, not difficult, just important) bits are done for polearms in the code. I have to make sure I've tracked down everything for parry and we have to rebalance how the Natural Stats are calculated, but most of the work now is scripting. Of course, I could have said right from the beginning that most of the work was going to be scripts, so it's not like this was a huge change ;-)

    Since we're adding polearms to the starting weapon list, and we don't want to have an uneven GUI, I've also added Leather Gauntlets and Fire Dart (may get replaced) to the list.

  6. The Man In Black

    The Man In Black Administrator Staff Member Administrator Moderator Developer RiP

    Jul 9, 2006

    Thothie and I have been scouring the Quake1 engine code to find solutions to some of our problems. The first thing I've found is how to make it so viewmodels don't stick into walls. This means that we'll finally be able to apply the viewmodel-submodel change and clear up a LOT of model space. We'll be exploring more to see what we can come up with.

    We've also been discussing how to redesign the inventory system in such a way as to drastically reduce the entity/edict count, memory usage, and processing speed. It'll be a lot of work, and may not get applied for awhile, but it's nice to have something like this in the works to get MS:C running in better shape.
  7. The Man In Black

    The Man In Black Administrator Staff Member Administrator Moderator Developer RiP

    Jul 9, 2006
    Up until recently I've made my change notes in the Coding forum or in PMs, since we were trading changes and uploads via the forums. Since we've moved code and scripts to a repository where I can make my changes without accompanying explanation, I've decided to start posting here again. Plus, gives the community a chance to mull over the changes I'm making in case someone spots a flaw or thinks up an enhancement before it goes out the door.

    That being said, in addition to the changes that were outlined in the sneak peek elsewhere, here are the changes I've recently promoted:

    • Fixed scrolling not occurring on stores/chests
      • Also centralized the system so I don't have to rewrite the same logic. Menus can more easily flag when they want the scroll to affect a scroll panel
      • Also added cvar "ms_scrollamount" to affect how much the scrollbar moves. Defaults to 30 (which I assume is in pixels, but it's hidden in the engine exactly what the number does)
    • Improved double-clicking in inventory after Valve broke it
      • Single click on a selected item de-selects again
      • Tracks last clicked time and last clicked object (so multiple items work)
      • Uses new cvar "ms_doubleclicktime" to determine how quickly the second click must come
      • If item is selected and clicked, then clicked quickly enough, does NOT choose item. Second click must be on a selected item
      • Interface can be used in other places if we need it
    • Added double-clicking to sell items at shops
      • Uses exact same double-clicking code as the inventory stuff
    • Fixed selling items to shops "forgetting" items if you tried more than ~11 in one go
    • Made a prettier CheckBox element
      • I had written a bad one when I added alphabetic inventory, but it was kinda ugly. For the check it just put "[ ]" or "[X]" at the beginning depending on if it were checked. Rewrote to look all pretty 'n stuff
      • Checkbox.png
      • I know it's not particularly exciting, but it took some working to get it looking as good at it does, and I'm also vain, so there it is.
    • Added "Drop Selected" button to inventory.
      • It, uh... drops selected items.
      • If no items are selected, the button is "Remove", as it is currently, to remove the gear item.
      • If one or more items are selected, replaces the "Remove", which currently disappears, with "Drop Selected"
      • Only slightly annoying bit is that, since you're dropping them all at the same time, they do that thing where they very slowly float to the floor because they're colliding with each other. But eh, minor aesthetics.
    Been enjoying messing with GUI stuff as of late. Wouldn't mind writing up some new stuff for it, but nothing we really need right now. Sadly, the engine is broken in some places, so some of the things I want to fix I don't appear to be able to. Namely, would love for Escape to close the current menu, but even though the engine passes off key ups and downs to us for processing supposedly first, I still can't intercept an Escape-down. Also can't find any way to fix being able to interact with menus when the console is open. Hopefully Sven fixes that, but I've not played with it yet.

    On the non-coding side, I wrote up about 5 pages of first draft lore stuff for Oyster's dwarves. Per notes, working on making them sound not so posh and more like dwarves, but still trying to keep as poetic as I can with their coarse accent
    Last edited: Apr 20, 2019
  8. The Man In Black

    The Man In Black Administrator Staff Member Administrator Moderator Developer RiP

    Jul 9, 2006

    Can't reproduce under the alpha. Can anyone confirm that the under the current patch it fails to pass 100% of the time, not an intermittent bug that I just missed?

    Sausage inna Bun fixed.

    Fixed after a looooong bit of debugging. FYI for the gobs of players I know are clamoring to fight bear gods, it's not a problem with death. It's caused when the polar god specifically does his AOE stun at (more or less) the exact same moment the blizzard is recreating itself. I don't know if there's anything you can do to avoid it, other than just killing him really fast or praying.

    Considering adding some sort of way to split stacks of things in your inventory. Being that I don't want to break the stacking functionality, think it would just be an option to right-click and a submenu pops up that allows you to "Move X to hand". Probably have 5, 10, 25, 50, 100, only showing the options you have enough for. Stacks still auto-combine on adding to inventory.

    Other than that, probably sticking to the neverending bug fixing
  9. TheOysterHippopotami

    TheOysterHippopotami Active Adventurer Source Developer Developer DarkTide RiP

    Sep 6, 2009
    ice circle exp goes to swordsmanship i believe, rather than ice.
  10. Thothie

    Thothie Administrator Staff Member Administrator Moderator Developer

    Apr 8, 2005
    Think we got that, did a big sweep over all the weapon DOTs. Wasn't an option to control which skill DOT went to up until a few years ago, so some needed updating.
  11. greatguys1

    greatguys1 Renowned Adventurer Developer Warriors of the North

    Apr 20, 2013
    I recall having fixed this already.
  12. The Man In Black

    The Man In Black Administrator Staff Member Administrator Moderator Developer RiP

    Jul 9, 2006
    If you get some time, can you take a look at the bugs list and PM me the none-:idea:'d items that you've fixed? I'll check them off and stop beating my head against the wall trying to reproduce them :wink:



    It's done, and it's beautif- Well, it's functional, anyway. While testing I did find another aesthetic bug that I'm not tracking down right now, but MAY be seen a bit more often. Not sure. Anyway, if you're holding a stackable item, then you put it in a pack with a stack that it will add to, it won't actually display as added. You'll see two distinct stacks.

    Fixed, and the related bug where in the same conditions the character select screen shows ye olde armor bug with the body showing through armor

    Fixed, along with them also showing as fire on character select and when dynamically spawned

    @Thothie: FYI, I re-added the setmodelskin command, and more importantly I had to change the tomahawks to call bw_setup_model from game_spawn because that character select screen expects skin/model to be set by game_spawn and it wasn't getting skin until deployed as was.
  13. greatguys1

    greatguys1 Renowned Adventurer Developer Warriors of the North

    Apr 20, 2013
    The following should be fixed:

    Ice bow still doesn't properly give its cold resistance the first time you draw it in a map.*
    Heavy/Light Crossbow jamming when firing

    Otherwise the list is pretty accurate

    The OTHER to-do list, however, I dunno if Thothie kept an updated version of it
    Last edited: May 9, 2019

Share This Page