FSGModding / FSG_Mod_Assistant

Farming Simulator 22 Mod Manager.
https://fsgmodding.github.io/FSG_Mod_Assistant/
ISC License
71 stars 11 forks source link

[FEATURE] Is it possible to add data from <combination…/> lines of .xml object files? #207

Closed vitalii2011 closed 5 months ago

vitalii2011 commented 5 months ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

No response

Anything else?

No response

jtsage commented 5 months ago

Um, yeah, actually. It'll still be potentially limited - but with the addition of the base game stuff, that covers all of those, and most mods will either reference base game or their own combinations, so, yeah, should work.

Lemme play with this today - great idea!

vitalii2011 commented 5 months ago

If it works, then it is very necessary that you can open “compatible objects” in a separate window and/or at least an item in the context menu: “~ All compatible” with the creation of a text file with links to basic objects and mods.

jtsage commented 5 months ago

2024-01-14 11_20_10-basegame html

Getting somewhere. The image / brand image / title are clickable to open the details. The little orange guy is the compare button. I was gonna do a "compare all" button at the title. Opening in a new window is actually pretty difficult because of how I have to do window management, but I'll look into it.

jtsage commented 5 months ago

Just trying to think this through, and I have a few other things to do today. But

Base Game browser

Mod Look Details

jtsage commented 5 months ago

Sigh. Stupid amount of work pending.

It occurs to me that this will only list the specified combos - but lots of other equipment will work. I'd just need to parse the attacherJoints on each item. So, yeah, gonna do that too. So much for a release today :)

Fwiw @vitalii2011 - I have not yet added the bit to force refresh of the detail cache (orange button in the "Mod Cache" bit in user preferences) - but every time I add something to the parser that needs hit or these features are going to rest pretty wonky.

parent

 <attacherJoints>
        <attacherJoint jointType="cutter" node="attacherJointCutter" jointPositionOffset="0 0 -2.277" lowerTransLimit="0 0 0" lowerRotLimit="0 0 15" lockDownRotLimit="true" moveTime="2.5" comboTime="0">
            <distanceToGround lower="0.61" upper="2.12" />
            <rotationNode node="attacherJointRot" lowerRotation="25 0 0" upperRotation="-14 0 0" startRotation="0 0 0"/>
            <bottomArm rotationNode="feeder" referenceNode="attacherJointCutter" startRotation="0 0 0"/>
            <schema position="1 0" rotation="0" invertX="true" />
            <attachSound template="HEADER_ATTACH_01" linkNode="attacherJointCutter"/>
        </attacherJoint>
        <attacherJoint node="trailerAttacherJointBack" jointType="trailer" lowerRotLimit="25 75 50" upperRotationOffset="0" allowsJointLimitMovement="false" canTurnOnImplement="false" comboTime="1">
            <schema position="1 0" rotation="0" invertX="false"/>
            <attachSound template="ATTACH_01" linkNode="trailerAttacherJointBack"/>
        </attacherJoint>
    </attacherJoints>

child

<attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="cutter" >
                <heightNode node="heightNode01" />
                <heightNode node="heightNode02" />
                <heightNode node="heightNode03" />
                <distanceToGround lower="0.15" upper="1.8" />
            </inputAttacherJoint>
        </inputAttacherJoints>
    </attachable>
vitalii2011 commented 5 months ago

this will only list the specified combos - but lots of other equipment will work For some reason, this is not done even by the game mechanics. Maybe it's very complicated and/or the Giants skipped/didn't work on it because of the difficulty.

jtsage commented 5 months ago

My guess is they wanted the brand limitation, even though there isn't really one. I'm gonna run down this road, of course things are gonna get real interesting when I hit trailer, trailerLow and trailerHigh - because there are a ton of them. I think I will also add which joints are available on a vehicle/implement in the info box.

jtsage commented 5 months ago

So, this wasn't the real time consuming rabbit hole - the real time consumer is I started needing a few icons, so I pulled them in, but they were ugly, so I generated SVG versions for all of the game icons I use - including fill types. Hopefully I'll make some real progress on changing over the use of static files with the new SVG this weekend and get a release out.

vitalii2011 commented 5 months ago
jtsage commented 5 months ago

Oh, I don't hate that at all - yeah, should be possible. I based my display off of the in-game store one, but adding it there should be no problem. Filtering might take a bit more, but I'll look into it

vitalii2011 commented 5 months ago

For combine harvesters, the determining factor is the capacity of the bunker (instead of ~speed?); Based on this, a trailer is selected, and a tractor is selected for the trailer. Of course, this is just about my playing style. Many people prefer to play realism and the price of transport and equipment is important to them.

jtsage commented 5 months ago

No, I see what you mean. I am working my way through my incredibly convoluted code on a couple sections today - breaking things into reusable libraries - there is no reason when I get to the vehicle/implement items I can't add some additional logic to include the bits that matter. One of my major complaints on a few of the other options out there is they throw a massive amount of largely unimportant data in your face, I don't want to follow suit, I want to be better :)

jtsage commented 5 months ago

2024-01-20 13_22_46-FSG Mod Assistant

something like this maybe? (still a ways to go, but getting prettier by the minute)

vitalii2011 commented 5 months ago

Yes. Certainly.

vitalii2011 commented 5 months ago

Maybe to save space, if in " ... " there is only one entry "<motorConfiguration ... " show only one/maximum(?) engine power? Image 002

jtsage commented 5 months ago

Sigh. Yes indeed. The brutal thing is I had this working earlier, and clearly messed something up during all the code refactoring and it reverted. Good catch.