Jump to content
The Dark Mod Forums

Programmer


AlexDiru

Recommended Posts

To me, it looks better once changed as it matches the download list, however, I guess this is all personal preference - are bugs reviewed once people submit them?

 

Please could I have permissions added for the repo if you want me to commit this fix/preference?

 

When new coders volunteer, they post their changes for review via a patch file. We look through the patch file and see if it looks okay, then apply the patch for them.

 

After they have a few bug fixes under their belt, and it looks like they're getting the hang of it, w/o needing a lot of fixes to their patches, then we'll open the door and let them have write access to the source repo.

 

So hang in there, fix a few problems, and we'll see about getting you write access.

 

For future reference, I prefer that you mark your code changes so they can be tied to specific problems that you're fixing. For example, search for "grayman" in the source to see how I've done it for my changes. I find this invaluable if we later have a problem in a bit of code and need to talk to the person who made the change. (Also, in my case, it makes it easier for me to find all the scattered bits of changes I made a few years back to fix a particular problem.)

  • Like 1
Link to comment
Share on other sites

Ok that sounds good.

 

But just to be awkward - what about when I remove code? Do the keep the removed code commented out, or just note I've removed code? This would be for the mission list name organisation.

 

How do patch files work, is there a wiki guide, or is it as simple as uploading any changed code files?

Link to comment
Share on other sites

"Second point, you are correct, I can't see a fix for the general case without a fundamental change of the behaviour of the reading of the files - I think it would be better just to hardcode the fixes, since they are in-built items and people can still control custom items.The hardcode fix will be something like:"

CanDrop?() {
   If Name In { "Compass", "Lockpick", "Blackjack", ... }
      Return False
   Behave As Normal From Here On
}

I wouldn't take that route. I'd look at the Shop code and try to understand the origin of the un-droppable state.

 

For example, CShop::AddItems() handles the reading of the shop entity, and checks droppability using this line:

 

bool canDrop = mapDict.GetBool(itemPrefix + "_canDrop", "1"); // items can be dropped by default
To me, that looks like a disparity between what items that aren't handled by the shop entity default to ("0") and what items that are handled by the shop entity default to ("1").
But that might not be something that can be reconciled after 10 years, given the danger of making a change and unknowingly wrecking an existing map.
--------------------------------------------------
The droppability bug in the shop should deal with "when an item says it's not droppable (whether via the shop item or via a def file), why do we give it a Drop/Take button?". Once you take the button away, the "but the item I dropped in the shop is still in my inventory at map start" complaint goes away.

 

Link to comment
Share on other sites

But just to be awkward - what about when I remove code? Do the keep the removed code commented out, or just note I've removed code? This would be for the mission list name organisation.

 

How do patch files work, is there a wiki guide, or is it as simple as uploading any changed code files?

 

I comment out code that's no longer used. That way, someone following later can see what used to be there. Sometimes we find--months later--that removing a bit of code caused an unforeseen problem, and it's easier to just remove the comment marks than it is to compare SVN revision differences and try to reconstruct "the old way".

 

After a few releases, and especially if the surrounding code starts to become a bit unreadable, we can remove old dead commented code, just to clean things up.

 

You need to read SVN documentation to understand how to create and install a patch. For example, if you're using TortoiseSVN, you'll find that here.

Link to comment
Share on other sites

 

For example, CShop::AddItems() handles the reading of the shop entity, and checks droppability using this line:

 

bool canDrop = mapDict.GetBool(itemPrefix + "_canDrop", "1"); // items can be dropped by default
To me, that looks like a disparity between what items that aren't handled by the shop entity default to ("0") and what items that are handled by the shop entity default to ("1").
But that might not be something that can be reconciled after 10 years, given the danger of making a change and unknowingly wrecking an existing map.

 

I agree with that, I think there's a very high risk of breaking stuff for this minor change

 

 

 

The droppability bug in the shop should deal with "when an item says it's not droppable (whether via the shop item or via a def file), why do we give it a Drop/Take button?". Once you take the button away, the "but the item I dropped in the shop is still in my inventory at map start" complaint goes away.

 

 

Yep, the key is that it is not looking at the def file, only items in the map file. If the code was changed significantly to look at attributes in both the def and map files, I have a feeling it's going to break a lot of FMs - and this will be hard to test for.

 

Cheers for the SVN link, I'll give it a read :)

Link to comment
Share on other sites

 

Yep, the key is that it is not looking at the def file, only items in the map file. If the code was changed significantly to look at attributes in both the def and map files, I have a feeling it's going to break a lot of FMs - and this will be hard to test for.

 

 

Ah, but the way things work at spawn time is that the def file is read and the spawnargs are put into a dictionary using key/value pairs.

 

Then the spawnargs defined in the map file are added to the item's dictionary. If an item redefines a key/value pair, it gets changed.

 

When the shop is built, it looks at the dictionary's key/value pairs, and shouldn't care whether a pair originated in a def file or a map file.

 

Something weird is going on there, and it needs to be uncovered and fixed.

Link to comment
Share on other sites

I know i'm late to the game (or maybe this thread is moving fast) but I just wanted to say welcome Alex and thanks for putting forward your talents toward bettering the mod :)

  • Like 2
Link to comment
Share on other sites

 

Ah, but the way things work at spawn time is that the def file is read and the spawnargs are put into a dictionary using key/value pairs.

 

Then the spawnargs defined in the map file are added to the item's dictionary. If an item redefines a key/value pair, it gets changed.

 

When the shop is built, it looks at the dictionary's key/value pairs, and shouldn't care whether a pair originated in a def file or a map file.

 

Something weird is going on there, and it needs to be uncovered and fixed.

 

So at the shop spawn the dictionary should contain pairs from both the def file and the map file (if the item is in both?)

 

 

I know i'm late to the game (or maybe this thread is moving fast) but I just wanted to say welcome Alex and thanks for putting forward your talents toward bettering the mod :)

 

Thank you :)

Link to comment
Share on other sites

 

So at the shop spawn the dictionary should contain pairs from both the def file and the map file (if the item is in both?)

 

 

I'd rather not give answers to questions w/o walking through all the steps of the code; this isn't something that's on the tip of my tongue.

 

I don't have time to do that right now. So it'll be up to you or whoever decides to take on this issue to walk through the code to see what it actually does, with various examples to test all the combinations.

Link to comment
Share on other sites

Oh boy, I didn't realize that was going to turn into such a complex fix for such a small bug :) But nonetheless, its good to get some understanding of how the shop handles items. This only occurred to me while making persistent items across multiple missions in this case The Stone.

 

Thanks Alex and Grayman for looking into that. I'm excited to see what contributions you make Alex!

  • Like 1
Link to comment
Share on other sites

Yeah I thought it was the simplest one to start with!

 

Do you have any resources which will give me an understanding of how idTech does graphics (never really done much low level graphics programming) and AI (again, never done low level AI)? Even if it's just generic resources not specifically idTech. (Extra points for books, I love books)

 

Lots of the tickets are to do with graphics and AI; I wouldn't know where to begin!

  • Like 1
Link to comment
Share on other sites

Yeah I thought it was the simplest one to start with!

 

Do you have any resources which will give me an understanding of how idTech does graphics (never really done much low level graphics programming) and AI (again, never done low level AI)? Even if it's just generic resources not specifically idTech. (Extra points for books, I love books)

 

Lots of the tickets are to do with graphics and AI; I wouldn't know where to begin!

 

Start here:

 

http://fabiensanglard.net/doom3/index.php

  • Like 2

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

 

 

Lots of the tickets are to do with graphics and AI; I wouldn't know where to begin!

 

You seem to have finished the one you started and only need to wait for a response from Aluminium Haste on this: http://bugs.thedarkmod.com/view.php?id=4488

 

​Could you check out mine? The bugtracker issue is fresh but the issue has actually been dragging on for 2 years. Never managed to set it up properly. There were some people that helped me a great deal, but somewhere halfway through, one forum member, Tels just went AWOL and I'm stuck. I really, really dream to see this make it into the 2.06 version of the game.

 

http://bugs.thedarkmod.com/view.php?id=4523

Edited by Anderson

"I really perceive that vanity about which most men merely prate — the vanity of the human or temporal life. I live continually in a reverie of the future. I have no faith in human perfectibility. I think that human exertion will have no appreciable effect upon humanity. Man is now only more active — not more happy — nor more wise, than he was 6000 years ago. The result will never vary — and to suppose that it will, is to suppose that the foregone man has lived in vain — that the foregone time is but the rudiment of the future — that the myriads who have perished have not been upon equal footing with ourselves — nor are we with our posterity. I cannot agree to lose sight of man the individual, in man the mass."...

- 2 July 1844 letter to James Russell Lowell from Edgar Allan Poe.

badge?user=andarson

Link to comment
Share on other sites

To me that seems like an art problem if it's in the pk4 file. Does it work by replacing the current pk4 file with the one that worked?

 

I already hosted a file on Google Drive a replace of the pk4 file with working words but they are just placeholder plain latin words without umlauts. I just wanted to see if the issue is acknowledged for 2.06. You can find it here: http://forums.thedarkmod.com/topic/18828-romanian-gui-issue-request-for-bugtracker/

 

The deeper long term issue is connected to missing fonts in Unicode that the game can't read. This concerns diacritics such as for example ă,î, â.

More details here:

http://bugs.thedarkmod.com/view.php?id=2778

http://bugs.thedarkmod.com/view.php?id=2779

http://bugs.thedarkmod.com/view.php?id=1610

Edited by Anderson

"I really perceive that vanity about which most men merely prate — the vanity of the human or temporal life. I live continually in a reverie of the future. I have no faith in human perfectibility. I think that human exertion will have no appreciable effect upon humanity. Man is now only more active — not more happy — nor more wise, than he was 6000 years ago. The result will never vary — and to suppose that it will, is to suppose that the foregone man has lived in vain — that the foregone time is but the rudiment of the future — that the myriads who have perished have not been upon equal footing with ourselves — nor are we with our posterity. I cannot agree to lose sight of man the individual, in man the mass."...

- 2 July 1844 letter to James Russell Lowell from Edgar Allan Poe.

badge?user=andarson

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...