Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pdmod to U104 and add contribution guide #18

Open
polarathene opened this issue Jul 1, 2016 · 28 comments
Open

Update pdmod to U104 and add contribution guide #18

polarathene opened this issue Jul 1, 2016 · 28 comments

Comments

@polarathene
Copy link
Owner

This is an easy task usually to do but usually a bother for me due to hardware and time/bandwidth constraints. As the user base for BigLobby is no longer what it used to be and development is slow, I'll add a guide on how to do these patches for the pdmod so PRs can be made. The updates and breakage have become too frequent.

@gametoon
Copy link

gametoon commented Jul 1, 2016

Thanks @polarathene .

@OsmoticCosmos
Copy link

So are you abandoning the project due to those constraints or are you simply giving us a guide so we don't need to wait for updates?

@polarathene
Copy link
Owner Author

polarathene commented Jul 1, 2016

@OsmoticCosmos I'm just too busy with work even sometimes doing work related stuff in time off. Until I have more time to commit to BigLobby with actual development I don't want to let anyone down when I don't get around to pushing an update/fix just so the mod continues to work in it's current state.

It's usually easy to update:

  • Download the game(takes 3-5 hours+ for me usually and I need another 30GB on my small SSD drive which barely has this much free).
  • Extract the assets with Bundle Modder to get the network.network_settings file.
  • Use a diff tool with the same file in BigLobby source code to find the new/changed network functions and add those to the BigLobby one(+any biglobby__ prefix version if needed).
  • Use Bundle Modder to make the new pdmod file.
  • Commit changes to your fork of the git repo, push changes to it and create PR to mine.

If anyone wants to save me the download time/space issue and provide me with the network.network_settings file, I can do the rest.

As far as the actual mod development goes, I'd love to get it to a proper release eventually. I currently have about 200 tabs almost in Chrome(16GB RAM maxed, can't play games :( ) full of research that I'm making notes of now, and about 400-500 tabs over several browsers at work(again maxed RAM) that I've built up over past 2 months that need to be documented. It's insane but that's how I learn new things fast :) Documentation aside I still have lot of decisions to make and code to write until we get more developers(hopefully in a month or two), might have more time for BigLobby then :)

@gametoon
Copy link

gametoon commented Jul 2, 2016

@polarathene For u104 i think we need to edit in lua files too. I already try to make new mod yesterday but it's not work. Everything look fine (Biglobby + every function work + game not crash anymore) but my friend cannot join me. ( May be search key problem?) I try to edit lua files but there are lot of function so i don't know which files i should edit. Any advice?

@RedLeo
Copy link

RedLeo commented Jul 2, 2016

@gametoon I think you need to fix the .pdmod

@polarathene

If anyone wants to save me the download time/space issue and provide me with the network.network_settings file, I can do the rest.

So you just need the network.network_settings?

@gametoon
Copy link

gametoon commented Jul 2, 2016

@RedLeo I already make the new one (.pdmod) with new network.network_settings that extract from original U104 and then find the different thing between u104 (Original) and Biglobby one and replace it. And use this file to create the new .pdmod. I think i didn't miss something. So what did you mean "Fix" ? And if you take a look on this repo you will know that on u103 @polarathene also edit some lua files too. So that is not mean you only need to edit "network.network_settings" to get this mod work. There might be some other file that need to edit.

Like he said "It's usually easy to update:" "usually" is not "Alway".

@polarathene
Copy link
Owner Author

@gametoon Sorry about the sloppy commits. The other stuff was just improvement far as I recall, last few updates are just network settings updates and fixing mistakes I make like typo or version update.

You're right though that some lua change might be required, I forgot to mention new network method need to be added to this file. I may not have done this for new method on last update or so either :(

Make sure that everyone uses the new pdmod(and any lua changes) if you want to use the improvement you make.

@polarathene
Copy link
Owner Author

@RedLeo yes I just need that file and I will create update. If anything else cause the crash I need proper bug report with crash log. I haven't been able to start download U104 yet, so if you can get that file to me I will release patch for U104.

@gametoon
Copy link

gametoon commented Jul 2, 2016

Thanks @polarathene and i didn't blame you. I understand that is not easy to describe everything in one post.

@RedLeo
Copy link

RedLeo commented Jul 2, 2016

@polarathene
Copy link
Owner Author

@RedLeo thanks for that, sorry about the delay, I've pushed the release, you can find it here .zip file at the bottom as per usual. Let me know if you run into any problems, I've not been able to test on my end.

@gametoon I'm not sure how similar your diff is or how you did your merge to update the pdmod, my diff wanted to remove </rpc> for the new function which would not be good :) You can see the network.network_settings diff commit here. There was nothing special about the new or modified methods, if you're still having problems follow the step by step instruction on the updated ReadMe, you might just have to verify cache and reinstall the pdmod for example. I will help further if you can provide more information about any problems.

@gametoon
Copy link

gametoon commented Jul 3, 2016

Thanks @polarathene . I already know what cause this problem. Look like my source miss some lines. Not sure what cause this problem may be the original network.network_settings is not clean or some misplace copy. This problem have been solved.

@gametoon
Copy link

gametoon commented Jul 4, 2016

@polarathene I think u104 update cause network problem on biglobby. (Failed to Join and Disconnect problem.) I'm pretty sure that this is not user error. it's random error.

I have try with 7 friends. (Same files + Method + has play this mod before u104 update (Confirm that everyone know how to install this mod properly.))
I create 1 lobby and invite my friends to join. Some can join but some can't. So i try to create new lobby again the one that can't join can join me now. And some that can join before now cann't join me anymore. And Some in lobby has disconnect problem and cannot join lobby anymore after disconnect. (There are lot ppl try to join our room too but no one cannot join in.) So i go back to play without mod but everything is work fine. (So it's not my network problem.). Is it only me and my friends that got this problem?

@gametoon
Copy link

gametoon commented Jul 4, 2016

I just remember some thing. I think the lobby cannot contain more than 3 players for now (My lobby and other lobby that i found on crime net.) If someone can create more than 3 players , tell me pls. Now i guess that new update might decrease player to 3. (Found some lines that might cause this problem but i don't have time to test it yet.)

@polarathene
Copy link
Owner Author

@gametoon There is code in BigLobby to handle normal lobbies without disabling mod but this should not be active yet. There is a settings option for lobby size, if for some reason it is not at the default of 8 for the host then it might be at a low number by mistake?

You can confirm for me that your friends join your lobby via crime.net and see it there, or they join by steam invite? If they join on crime.net then this should confirm they using same version as you should all be using same search key defined here. If you disable that line, then you will see all normal lobbies on crime.net, and they will see you(players will try to join without mod and fail). I have done this to join older biglobby versions being hosted in the past.

Maybe I should enable this line again. It would at least tell people in game that they have the wrong version when joining via steam I think.

If another player also have this problem it would be good to know that limit is 3 like you say(no 4th player like normal lobby? or just mean 3 player can join?). May require me to go through lua source in update for changes or new code that might cause it. This will have to wait for weekend if I can find time.

@polarathene
Copy link
Owner Author

@gametoon Just to be sure all friends know what to do, I have these install and troubleshoot instructions: https://github.com/polarathene/biglobby#how-to-install

@gametoon
Copy link

gametoon commented Jul 5, 2016

@polarathene
I confirm that

  • My friends (Others too) see my lobby (Biglobby) though crime.net not normal one.
  • Same version of game and mod files. (Latest files from this repo.)
  • They know how to install. This is not first that we use this mod.

On U103 we play this mod without any problem.
http://thaigameguide.com/payday-2/payday-2-biglobby-mod/

I mean "3 player can join".

@polarathene
Copy link
Owner Author

polarathene commented Jul 5, 2016

@gametoon Ok, sounds like Overkill change Lua code this time too. Did you have same problem of only 3 people join in previous BigLobby version(2.0.5)?

I double checked my commits for 2.0.6 and don't see any typo or other mistake. I check the new lua commit for U104 here, I don't notice anything relevant here either.

If you do not see many lobbies available on crime.net with filter using world instead of close, then it sounds like BigLobby is working properly(I am wondering if it fail to load?).

Thankyou for making this guide :) One thing though!

เมื่อเราคลิกเข้าไป หน้าต่างจะแสดงรายละเอียดของ Mod ที่เราติดตั้งลงไป ซึ่งถ้าหาก Mod ที่เราติดตั้งลงไปเป็นเวอร์ชั่นเก่า เราก็สามารถอัพเดตได้ทันที ผ่านหน้าต่างนี้
When we click the window shows the details of the Mod , we installed. If the Mod, we installed an older version. We can update immediately through this window

Please remember that I have said this does not work. In last message I provide this link: https://github.com/polarathene/biglobby#how-to-install . In these new instructions I mention BLT Update feature does not work.

Your guide looks like it says to download from main github page, this can work but I link you earlier to releases page, specifically this is for v2.0.0 alpha and bugfixes. At the bottom of this link is latest .zip file, it contains biglobby folder to put in mods and the .pdmod file, it removes the other files not needed to make it easier for player to install. Also each update I say what was fixed.


Please make sure everyone is really using latest version 2.0.6. I do not know of official support, I have not added it, not sure what your screenshot in guide is downloading. It is not listed on the BLT mods page. @antonpup or @GreatBigBushyBeard can probably confirm this. I do not know how it works, if they added support and it does not download from my Master branch, you might be downloading outdated version.

I updated the mod.txt to use version 2.0.6, so you should be able to go into settings screen and see the version number like this, if not 2.0.6 it will say 2.0.0.

If everything is correct, then I need more information as I have no idea what could break it for you. Remove mod completely, verify cache, install again from releases link I provided.

@gametoon
Copy link

gametoon commented Jul 5, 2016

@polarathene I just compare files between from repo and your latest release biglobby-2.0.6-alpha.zip the only different is husl.lua. Is this file important? Because i use the files from repo. i also compare the different thing between repo / your release / my lastest pack files. All files are identical. (Except husl.lua)

About BLT i think it's really up to date and don't need to update it. Even try to update it will not update anyway like you have said. So it may be not BLT that cause this problem.

(Please remember that I have said this does not work. In last message I provide this link: https://github.com/polarathene/biglobby#how-to-install . In these new instructions I mention BLT Update feature does not

Thanks. It's my fault that didn't read it properly.

I will try again tonight and share the result. Thank so much @polarathene .

@polarathene
Copy link
Owner Author

@gametoon Ha, I did not notice I was putting the husl file in .zip release. It should not cause any problem, it is code for doing some colour feature. It is not in my repo because it is not ready yet. All files in the .zip release will be the same as the ones on Master branch of the repo.

Please let me know if you have luck making it work, I really have no idea why it would be broken since U103.

@RedLeo
Copy link

RedLeo commented Jul 9, 2016

@polarathene You've check elementareatrigger.lua? there's function ElementAreaTrigger:project_amount_all() and function ElementAreaTrigger:project_amount_inside() and etc.
whether it is related to the checking player in objective?

@polarathene
Copy link
Owner Author

@RedLeo I was investigating it some time ago but could not find enough players to test.

@RedLeo
Copy link

RedLeo commented Jul 9, 2016

@polarathene maybe you can upload it, and if i have enough friends, i will test it or maybe we can test it together if you have other players, or you open a test by invite them who had big lobby?

@polarathene
Copy link
Owner Author

@RedLeo I believe I lost it unfortunately :( I will let you know if I'm doing a test for it in future.

@RedLeo
Copy link

RedLeo commented Jul 11, 2016

@polarathene So sad to hear that, Ok I will wait for your invitation.

@RedLeo
Copy link

RedLeo commented Jul 14, 2016

@polarathene

is this working?

local orig__ElementAreaTrigger = {}
orig__ElementAreaTrigger.project_amount_all = ElementAreaTrigger.project_amount_all

function ElementAreaTrigger:project_amount_all(...)

    if self._values.instigator == "criminals" or self._values.instigator == "local_criminals" then
        local i = 0
        for _, data in pairs(managers.groupai:state():all_char_criminals()) do
            i = i + 1
        end
        if i >= 4 then
            i = 4
        end
        return i
    elseif self._values.instigator == "ai_teammates" then
        local i = 0
        for _, data in pairs(managers.groupai:state():all_AI_criminals()) do
            i = i + 1
        end
        return i
    end
    return orig__ElementAreaTrigger.project_amount_all(self, ...)
end

Adding this just make the Framing Frame Day 2(inside train) objective triggered, even if i don't go inside the train.

@polarathene
Copy link
Owner Author

polarathene commented Jul 14, 2016

@RedLeo What value is i when that happens? 4? What was the reason for changing this function in particular, did you track what calls it?

You are only adding the following modification right?

if i >= 4 then
    i = 4
end

I do not have access to the source repo at the moment to do a search, but if this all you changed and commenting out those lines prevents the objective being triggered on FF day 2, then you want to compare what i is before changed to 4.

The function looks like it gets a reference value, like how many criminals are playing(assuming this is actual player excluding AI), then it will be used to figure out things like are all players inside this trigger zone. If the function is used for other conditions however, your change might break them. Good find though! :) I can't recall what mission elements I was playing with at the time, I don't think this was one.

Looking at the original function it has no parameters, not sure if the ... could be causing problem. Try this:

function ElementAreaTrigger:project_amount_all()
    local i = 0
    if self._values.instigator == "criminals" or self._values.instigator == "local_criminals" then
        for _, data in pairs(managers.groupai:state():all_char_criminals()) do
            i = i + 1
        end
        if i>4 then
            i = 4
        end
    elseif self._values.instigator == "ai_teammates" then
        for _, data in pairs(managers.groupai:state():all_AI_criminals()) do
            i = i + 1
        end
    end

    return i>0 and i or managers.network:session() and managers.network:session():amount_of_alive_players() or 0
end

@polarathene
Copy link
Owner Author

@RedLeo I ended up looking into this a month or so ago and you were right about project_amount_all for FF day 2, I've not tested with >4 players but it should work, I've included it. I can add you in credits if you like :) I've also fixed the vehicle one which took a good while to figure out(I thought it was one of the many mission elements or the project ones like you have, but it was a check in vehiclemanager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants