-
Notifications
You must be signed in to change notification settings - Fork 178
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
Tools/NodeBeamUtil: added exporting of modified actor. #3185
Draft
ohlidalp
wants to merge
15
commits into
RigsOfRods:master
Choose a base branch
from
ohlidalp:Flip_nbutility_projects
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
also unified delimiters to ',' - no effect on functionality
FEATURE CHANGES: * There's a new checkbox in the NBUtil: "Override all node masses?" - if unchecked, the TotalMass slider doesn't affec the export. If checked, all nodes will get the 'l' flag and weight override parameter. This is the only way to propagate the slider setting to the truck file. !KNOWN BUG! The total mass inflates every time the checkbox is used - probably because the dry_mass/load_mass globals are unchanged and wheel nodes still abide it. * The cinecam was added to the export. CODE CHANGES: * Actor.h: some fields/funcs renamed and moved around. * Actor.cpp - the export function moved to new file 'ActorExport.cpp'
New checkbox: "Reduce dry mass by node mass overrides" - with explanatory text! I fixed the !KNOWN BUG! mentioned in previous commit - exporting the TotalMass slider value back to truck file is somewhat of a challenge, but when you check both the checkboxes, it works (with a minor discrepancy).
The new code is in ActorExport.cpp. A lot of code changes was needed: * RigDef_File.h: removed enum WheelBraking which duplicated enum wheel_t::BrakeCombo in SimData.h. Using the new WheelBraking everywhere. Finally got rid of `wheel_t::BrakeCombo ActorSpawner::TranslateBrakingDef(RigDef::WheelBraking def);` * Application.h: several enums moved here to break circular header dependencies (nasty C++ thing): RigDef::Keyword (from RigDef_File.h), WheelBraking + WheelPropulsion (from RigDef_File.h), FlareType+ ExtCameraMode (from GfxData.h)
It doesn't crash anymore but the wheel spring/damp still isn't saved.
Recent introduction of INT token type to GenericDocument broke the previous contract of NUMBER token type (handled by functions `isTokFloat()` and `getTokFloat()`) covering both ints and floats. To resolve this, a convenience getters `isTokNumeric()` / `float getTokNumeric()` were added - these work the same way as `*TokFloat()` functions before, accepting both INT and FOAT tokens and returning `float` datatype. The addonpart parser was updated to use these.
ohlidalp
force-pushed
the
Flip_nbutility_projects
branch
from
October 25, 2024 00:21
0a31404
to
7328ea4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ALPHA VERSION - Please expect glitches and rough edges all over the place
How to use
Spawn a regular zipped mod... N/B utils will ask you to create a project (= unzip the mod to a new directory).
Press the button... game will create the project and show box.
Spawn the project as usual
The N/B util now shows project name with [Save] button.