Home » MODDING HQ 1.13 » v1.13 General Development Talk » Hi everyone! A question on helping out on development. (-not sure what this is for, but I would like to help out by squashing some bugs-)
Hi everyone! A question on helping out on development.[message #356197] Wed, 19 December 2018 04:01 Go to next message
tryingtokeepup is currently offline tryingtokeepup

 
Messages:24
Registered:July 2012
Location: Hawaii
Hi everyone!

I was active, well, lurking a few years back, playing different mods and whatnot. I have always aspired to help out with the modding scene, but for the longest time had no ability to help out.

I finally have achieved some ability in coding (currently a Javascript webdev with some python background), so I thought I might take a crack at debugging the code.

The most persistent bug that I have seen has to do with the hospital in Cambria (each time I play the newest versions of 1.13, I eventually have the dreaded "hospital bug", where the timer icon appears after talking to either Nurse Jenny or the doctors and the injured mercs go into the operating room and the whole game basically freezes - although the game is still technically playing - , and you cannot exit out to the tactical screen or speed up time), and the boxing ring bugs. I know that both of these scenarios bug out because they are technically like super imposed cutscenes that allow for player interactivity (cook hack, but a hack non-the-less), and I was thinking that because Flugente and silversurfer and the rest of the developers are busy, I might take a look at the code and try to identify what is going on there as a junior dev.

However, when I check these links, out, I am a little confused. This is the repos for the original 1.13 stable version, is it not? If i wanted to help figure out the bugs for the newest, "unstable" revisions, how would I do so?

I apologize if this has already been written up somewhere. I spent a few days lurking and looking around, but I haven't found any threads on this topic directly, only admonitions to find the original code, clone the repo, and download some older version of VS (2008 or 2006) to compile it. If that is the correct procedure, I will go ahead and do so, but I am really interested in squashing bugs in the current iteration of 1.13, and not the original code.

Thank you for your time! If this doesn't get a response, I will go ahead and try to figure it out myself during this winter break. A link to the current repo for 1.13 development would be awesome too, unless that is a private repo and not available to the public!

Report message to a moderator

Private 1st Class
Re: Hi everyone! A question on helping out on development.[message #356199 is a reply to message #356197] Wed, 19 December 2018 04:06 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
Source for the main trunk:
https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13
Gamedir for the main trunk:
https://ja2svn.mooo.com/source/ja2_v1.13_data/GameDir

Use TortoiseSVN to download source code.
Source should be compiled with anything from VS2005 to VS2017, I personally use VS2013 + Visual Assist X.

[Updated on: Wed, 19 December 2018 04:07]




Left this community.

Report message to a moderator

Lieutenant

Re: Hi everyone! A question on helping out on development.[message #356205 is a reply to message #356199] Wed, 19 December 2018 21:02 Go to previous messageGo to next message
tryingtokeepup is currently offline tryingtokeepup

 
Messages:24
Registered:July 2012
Location: Hawaii
Thank you sevenFM! So, once I compile this, I should be up to date with the latest unstable revisions that are inside the SCIs?

I will try this out this week. I am more familiar with VS2017 (i normally simply use VScode for work, but I'll get the whole shebang set up for this), so I will use that for now. If there are any new updates, I guess we update with the SVN, and then recompile and overwrite our original data folder. Is there a more elegant way to do this? Sorry, I am very new to actual software modification work. If you don't mind, is it alright to DM some questions this month?

Thank you again for the quick reply!

Report message to a moderator

Private 1st Class
Re: Hi everyone! A question on helping out on development.[message #356208 is a reply to message #356205] Thu, 20 December 2018 01:21 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
tryingtokeepup wrote on Thu, 20 December 2018 00:02
I guess we update with the SVN

Yes.
Quote:
and then recompile

Yes.
Quote:
and overwrite our original data folder

Just the exe file.
Quote:
Is there a more elegant way to do this?

What's not so elegant in updating from svn and compiling new exe?



Left this community.

Report message to a moderator

Lieutenant

Re: Hi everyone! A question on helping out on development.[message #356210 is a reply to message #356208] Thu, 20 December 2018 05:02 Go to previous messageGo to next message
tryingtokeepup is currently offline tryingtokeepup

 
Messages:24
Registered:July 2012
Location: Hawaii
Oh! That's how it works! Sorry, I assumed that the compilation of the GameDir would create many files, instead of just one .exe file. That is fine, indeed. I was trained to use git instead of SVN, so I came in with worries on how to revert changes or whatnot if I make a mistake on my local repo of the source code, but I am reading over how the SVN system works, and it is becoming a lot more intelligible to me.

Consider it growing pains for me. This is a completely new way of working with public sources (for me anyway), and its kind of exciting! Thank you for the help again sevenfm!



Report message to a moderator

Private 1st Class
Re: Hi everyone! A question on helping out on development.[message #356211 is a reply to message #356210] Thu, 20 December 2018 05:06 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
You cannot compile gamedir, it's just a convenient way of keeping your game data files up to date.
As for svn, I personally only use "svn update", "svn show log" and "svn commit" commands from context menu in explorer, you don't need more than that to work with sources.
If you break something, just delete the files and update from svn, it will restore them to actual version.

[Updated on: Thu, 20 December 2018 05:31]




Left this community.

Report message to a moderator

Lieutenant

Re: Hi everyone! A question on helping out on development.[message #356213 is a reply to message #356211] Thu, 20 December 2018 10:42 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
The way I work with SVN is to have separate folders for SVN code, SVN GameDir, "work code" and game. This way I can update the SVN code folder and then merge the changes to my "work code" folder. I only work in the "work code" folder and if there are changes that I want to commit I copy the modified files to the SVN code folder and commit. The same applies to game data. This way I always have an untouched SVN copy that I can use for reference.


Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: Hi everyone! A question on helping out on development.[message #356220 is a reply to message #356213] Fri, 21 December 2018 08:23 Go to previous messageGo to next message
tryingtokeepup is currently offline tryingtokeepup

 
Messages:24
Registered:July 2012
Location: Hawaii
This all makes tremendous amounts of sense. Thank you. I will attempt to do some whitespace fixes tomorrow (not even sure if that's a thing hahaha) and locate the code for Cambria's hospital. I'll try to replicate the hopsital timer freezing bug this week, put a break point somewhere in that code, and puzzle out what causes it to freak out (it might be something to do with how many items are in inventory at that sector, but I dunno. need to investigate). When I have some sort of fix or comment, I will post on this thread with the question, and I hope I can get some help at that time on how to offer that code as a pull request (not sure what the terminology is for SVN, but that's how I was taught how to do it with git).

Have a wonderful christmas weekend!

Report message to a moderator

Private 1st Class
Re: Hi everyone! A question on helping out on development.[message #356232 is a reply to message #356220] Tue, 25 December 2018 10:53 Go to previous messageGo to next message
tryingtokeepup is currently offline tryingtokeepup

 
Messages:24
Registered:July 2012
Location: Hawaii
Hey everyone! Merry christmas. I was able to get my debug exe working fine with 2017, everything is hunky dory. I think I even managed to figure out where the code that manages the hospital is inside the repo.

Now here is the question: how do I play the game with Visual Studio in the background? Is it as easy as just putting breakpoints inside the code, building a exe with those breakpoints in there, and triggering the event while playing the game? What if I want to add in a breakpoint later on when I am playing?

Sorry if these are baby questions, but I am not exactly putting 2 and 2 together yet on how to run the game and break down where the bugs are. Any help would be deeply appreciated!

Report message to a moderator

Private 1st Class
Re: Hi everyone! A question on helping out on development.[message #356233 is a reply to message #356232] Tue, 25 December 2018 10:56 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
What I do:
1. Compile debug version.
2. Run ja2_debug.exe
3. Attach VS to ja2_debug.exe (menu debug/attach to process)

Now you play a game and as soon as the game code reaches breakpoint it will stop and switch to a line in Visual Studio.
Then you can do whatever you want - step over, step into, watch variables etc, then continue normal code flow until next breakpoint.



Left this community.

Report message to a moderator

Lieutenant

Re: Hi everyone! A question on helping out on development.[message #356235 is a reply to message #356233] Tue, 25 December 2018 11:39 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Or just run the debug exe from VS. I believe F5 is the default key for that which will automatically attach VS to the process for debugging.


Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: Hi everyone! A question on helping out on development.[message #356239 is a reply to message #356235] Tue, 25 December 2018 22:45 Go to previous message
tryingtokeepup is currently offline tryingtokeepup

 
Messages:24
Registered:July 2012
Location: Hawaii
i love you guys. thank you. ill try this out right now. nothing says christmas like watching bull beat the crap out of a bunch of saps in a boxing ring.

Report message to a moderator

Private 1st Class
Previous Topic: Is there an .ini setting which allows unlimited contract extension?
Next Topic: Is there an official Github/Gitlab/Sourceforge repo?
Goto Forum:
  


Current Time: Fri Mar 29 06:37:56 GMT+2 2024

Total time taken to generate the page: 0.01235 seconds