Innsewerants has quit [Remote host closed the connection]
<JPLRepo>
Yup
ferram4_ has quit [Read error: Connection reset by peer]
ferram4_ has joined #kspmodding
<taniwha>
egg|zzz|egg: not off hand
<taniwha>
so... who decided to mess with MM? :)
<taniwha>
however, I'm sure Sarbian will come up with something
<TriggerAu>
noone taniwha :)
<taniwha>
really, I expected than answer
<TriggerAu>
"that answer" or "than answer"?
<taniwha>
that :/
<TriggerAu>
had me confused there
<taniwha>
bloody phonetic typos :(
SirKeplan has quit [Ping timeout: 190 seconds]
* TriggerAu
would say bloody phonecians, but not sure if thats only a historical country
<taniwha>
might be some time-travelers
SirKeplan has joined #kspmodding
<JPLRepo>
Yea we need to discuss MM with Sarbs when he's up for it.
<JPLRepo>
"#" in the loc tags does not play well with MM
<xShadowx>
accually, isnt # just used on the chick-if-node-has-value line?
<xShadowx>
check*
<xShadowx>
ie #title = lala # does nothin or ?
* xShadowx
thinks he missin somethin
<xShadowx>
ah variables!
<xShadowx>
JPLRepo TriggerAu - 1.2.9 is a prerelease, and first time (for squad) non alphanumeric chars are used for field names isnt it? any accual requirement for # to be used? drop it for 1.3.0? just thoughts ;3
<JPLRepo>
It will be discussed. That's an option.
<JPLRepo>
But not one to be taken lightly
<xShadowx>
just seems odd it exists, unless a req
blowfish has joined #kspmodding
GreeningGalaxy has quit [Ping timeout: 204 seconds]
GreeningGalaxy has joined #kspmodding
GreeningGalaxy has quit [Ping timeout: 204 seconds]
<xShadowx>
admittedly stupid question but curious nonetheless, title = #autoLOC_500289 i assume someplace (partloader perhaps?) reads and replaces with the entry from the correct localization node for curent languages, but what if i add an entry #autoLOC_987654 = 8.0 then do mass = #autoLOC_987654, think itd change the values based on localization?
<TriggerAu>
it could if the #autoLOC_987654 = 8.0 is in the localization tags set and the mass = converts from a string correctly - a couple of ifs there
<xShadowx>
ie could have a language pack en_us_imperial and change all the vaues to tons instead of tonnes o.O
<TriggerAu>
the game would still be using metric though
<xShadowx>
true ;\
<xShadowx>
im sure other uses though, that was just a random pick
<TriggerAu>
Im sure it would yeah
<TriggerAu>
Localization (at its simplest) is all about changing the output display of internal values to a set language - but its susbtition of a sort yeah
<xShadowx>
what about title = lalala dippy da #autoLOC_987654 dodedo <- replace chunk in string heh
<TriggerAu>
It should I believe, but Id have to check it
<xShadowx>
i can always test <3 just talking out loud at this point
<xShadowx>
but ya ideas :)
<TriggerAu>
its that or you do it the other way round - we have a bunch of notes, but not 100% ready yet
<TriggerAu>
some things may still change as we get all the words/languages/etc fitted in
<TriggerAu>
thus the pre
<xShadowx>
yeeeep
<xShadowx>
atleast you didnt label it ksp 1.3.0 yet
<TriggerAu>
lol
<xShadowx>
what was it ksp 1.1 with about 20x 1.1 versions
<xShadowx>
o.O
<TriggerAu>
as long as we dont get to 1.2 9 for reals hey
<xShadowx>
the numbers, does ksp hold any value to them? #autoLOC_987654
<TriggerAu>
in the tag no - they are simply unique keys
<xShadowx>
cuz if its just up to config find & replace (basicly like MM) i can see mods are going to fight for IDs >.>
<TriggerAu>
It doesnt have to be as short as a number, it could be #DavesUniqueLocalizationKey7forthenameofaplanet
<xShadowx>
oh so just #anything
<TriggerAu>
thats the naming weve been using yeah
<xShadowx>
so #TACLS_12345 and namespace stuff, that would help avoid fighting :D
<TriggerAu>
I prefer #MYKEYSAREBETTERTAHNYOURS!
<xShadowx>
just gotta deal with that # thing with MM :|
<TriggerAu>
yep work out some comons - MM has a lot of delimiting chars
<xShadowx>
~!@#$%^& are all used in MM ;/
<TriggerAu>
yeah I saw that this mornin
<TriggerAu>
when I double checked
<xShadowx>
? i dont thiiiiink is used, but i remember proposing it to MM for "add but dont edit if exists" as @ was edit, and % would override if existed, was no simple add heh
<xShadowx>
think blowfish added that function on a diff key ?
<blowfish>
& is create if not exists, which I added
<xShadowx>
:)
<blowfish>
(create if not exists but don't touch if exists)
<xShadowx>
so then ? should be clear unless itll mess with name searches which do use ?
<VanDisaster>
can you use 8 bit ascii symbols?
<TriggerAu>
? in a string that could contain questions - yeah Im not even gonna suggest that one
<xShadowx>
ah if replace portion of string and not full, i could see it
<blowfish>
I don't think ? is an operator
<TriggerAu>
stuff thats usual language is gonna be problems for localization type stuff - ?;:," etc
<TriggerAu>
it will be inside strings, etc
<blowfish>
yes
<TriggerAu>
We'll have a chat and probs with Sarb as well see where we can come down so it all works
<blowfish>
in wildcards it is a standin for any character
<TriggerAu>
hehe yeah lets use *
<xShadowx>
blowfish: sure but title = do you ?mykey this engine will fly?
<TriggerAu>
and put .* and see if theres regex in there
<xShadowx>
( ) i can see used in language stuff too
<xShadowx>
what about loc:mykey dont stick to single char tag
<TriggerAu>
you can sorta see how # ended up in use hey
<xShadowx>
not really cuz some mods use # in desc, to denote numbers :P
<xShadowx>
this is #4 try at this
<TriggerAu>
not gonna even give me a litle are ya :P
<TriggerAu>
as long as #4 isnt a key the mod wont be affected btw
<xShadowx>
by that logic, most i suggested should be valid then
<xShadowx>
(mykey) if no exist, wouldnt replace
<xShadowx>
?mykey
<xShadowx>
wouldnt trip MM
<TriggerAu>
theres options yes, and we been working em with the stock code and perf
<xShadowx>
< > i dont think trip MM
<TriggerAu>
so far thats been a good option and we'll work through the Pre to see if theres better
<xShadowx>
: trips regex, but any char can be used to trip regex ;x
<xShadowx>
; dont think is used, nor much in language
<xShadowx>
k i'll quit tryin to be useful and go back to burning kerbals :) good luck
<TriggerAu>
hehe
NathanKell is now known as NathanKell|AWAY
NathanKell|AWAY is now known as NathanKell|AliveAgain
NathanKell|AliveAgain is now known as NathanKell|AWAY
blowfish has quit [Quit: Leaving]
riocrokite has joined #kspmodding
<stratochief>
xShadowx: or, a 'Merica tag, and engines will list ISP in miles to the gallon, thrusts in pounds, orbits in miles
<egg>
stratochief: well, if you list ISP in seconds you're already doing the 'merica thing :-p
<egg>
you're really listing them is pounds force * second per pound mass
<egg>
(the Apollo 8 technical reports had I_sp both in lbf s / lbm *and* N s / kg, then later on they stopped using metric)
riocrokite has joined #kspmodding
<stratochief>
my spreadsheeting is happy with seconds of ISP, it just gets multiplied by little g in my usage. if you want to multiply a value by a constant and call it superior, with more trailing units, you euros can go right ahead :)
<egg>
stratochief: right, but that g_0 in the equation has nothing to do with physics: it comes from the units
<egg>
stratochief: also, why the "you euros"? O_o the Apollo tech reports aren't exactly dripping with garlic butter
<stratochief>
'cause that is the way bnumz reports ISP, and other euro sources I've seen, as their default or preferred
<egg>
stratochief: right, it still sees some usage on this side of the atlantic; but fundamentally that's what the US were and still use, just in their units
<Sarbian>
JPLRepo, TriggerAu : MM should lives as long as you do not also use $ in the loc strings
<Sarbian>
I am more concerned by all those arrays allocation...
<Sarbian>
(and on an unrelated subject I would love to know how you got the KSPedia asset file to shrink that much)
<blowfish>
which part of the localization code allocates arrays? I know it will allocate on strings because it processes each value...
<Sarbian>
loading a cfg from a file afaik
<blowfish>
I think all the localization is done after everything is loaded, it recursively loops through each config and localizes it
<blowfish>
but I might have missed something
<Sarbian>
ConfigNode.Load => ConfigNode.LoadFromStringArray => Localization.TranslateBranch = 1 array of ConfigNode + 1 List of Values
<Thomas>
blowfish: Localization is built into confignode
<Sarbian>
the one thing I don't understand yet is how it gets the loc string since they are also in CFGs. Are they loaded first in an other config parser ?
<blowfish>
could be there's some duplication going on
<blowfish>
yeah, looks like there is
<blowfish>
it attempts to localize them when they load but the game database does the same thing after
<blowfish>
which is odd because the localization strings come from the game database so there's no point in trying to localize until everything is loaded
GreeningGalaxy has quit [Quit: SIGNAL LOST]
blowfish has quit [Quit: Leaving]
<Sarbian>
I hate it when something that took me so long to properly understand changes so much :(
* xShadowx
agrees
<xShadowx>
im hapily stayin 1.2.2 atleast until something past 1.3 (1.4?) comes
<Lothsahn>
I was afraid of that. So there's no general or Boolean property of the engines to see?
<xShadowx>
what stock engine uses reversers?
<Lothsahn>
Wheesley and Goliath
ferram4_ has quit [Read error: Connection reset by peer]
<Lothsahn>
Basically I want my mod to be able to "click" the reverse thrust button on the stock engines
ferram4_ has joined #kspmodding
<Lothsahn>
But it sounds like there's no standard method to call... It's specific to each engine?
<xShadowx>
from a quick look, looks like animation is used as he said, i see nothing in ModuleEngines itself either, so typically what i've seen mods do is fetch the animation and check its state if its at start or finish
<xShadowx>
whatcha tryin to do? out of curiosity
<xShadowx>
think of the fields in ModuleAnimateGeneric notes the animation position too
<blowfish>
it would typically be ModuleAnimateGeneric
<blowfish>
the engine doesn't need to interact with it
<xShadowx>
p.s. new locationalization sucks for browsing configs :P
<xShadowx>
g/locationalization/localization
<xShadowx>
s/locationalization/localization
<Qboid>
xShadowx meant to say: g/localization/localization
<xShadowx>
ok i cant type today
<xShadowx>
JPLRepo: suggestion for the localization stuff, browsing configs and seeing the keys just annoyed me, startEventGUIName = #autoLOC_502015 for example, but parser ignores after the //, so startEventGUIName = #autoLOC_502015 //Reverse Thrust :) just an idea, using np++ to mass replace and save sanity atm <3
<JPLRepo>
thanks for your suggestion. yes aware of that already.
<xShadowx>
i mean i know i'm the minority so dont really take it as a complaint :)
<Lothsahn>
Shadow:. I'm working on LMP (multiplayer) and I'm trying to translate the thrust reverser State when another person clicks the button to the other client.
<Lothsahn>
In other words, if you reverse thrust... I want the other person to see that it happened. I also want their Craft on their screen to act as if it is getting reverse thrust for clientside prediction.
<Lothsahn>
It would also be nice if I could just hook into an event when it happens. Having the scan the entire vessel repeatedly is expensive and slows down the frame rate.
Sarbian has quit [Ping timeout: 180 seconds]
SirKeplan has quit [Ping timeout: 180 seconds]
ve2dmn has quit [Ping timeout: 180 seconds]
regex has quit [Remote host closed the connection]
<xShadowx>
uh.....dont know any animation event hooks ;\ wasnt there a way to use kspevent and kspaction to call another method when they fired?
<Lothsahn>
I don't know... And I can't find the method I'd need to call anyway... Where are the methods for the various parts anyway?
<blowfish>
Lothsahn: you should probably find the animation module once and look for changes in aniState
<Lothsahn>
I only have the KSP API...
<blowfish>
all this is public
<xShadowx>
^
<xShadowx>
also theres docs
<blowfish>
oh wait, it also implements IScalarModule, so you can subscribe to events
<Lothsahn>
Can you point me at a URL so I can RTFM?
* xShadowx
looks for link
<Lothsahn>
Because this is way over my current knowledge.
<blowfish>
it may not be well documented, but all the method names and parameters will be there
<blowfish>
you probably want to add an event to either OnMoving or OnStop
SirKeplan has joined #kspmodding
Sarbian has joined #kspmodding
ve2dmn has joined #kspmodding
<Lothsahn>
Ok. Great.
<Lothsahn>
How did you see the wheesley part to know it implements IScalarModule?
<xShadowx>
part.findmoduleimplimenting<iscalarmodule>() and hook :)
<xShadowx>
he didnt, he knows it impliments ModuleAnimateGeneric, which by that saw impliments IScalarModule
<xShadowx>
also ILSpy is your friend, just dont mention it in forums :P
Ezriilc has quit [Ping timeout: 200 seconds]
<Lothsahn>
Is the code for parts in the assembly?
<xShadowx>
Part class
<xShadowx>
though most 'function' is in PartModule and things that extend it
<Lothsahn>
So where is, say, the part definition for the Goliath Engine?
<xShadowx>
in a .cfg file in squad folder
<Lothsahn>
Foundit
GreeningGalaxy has left #kspmodding [FAULT ACK]
<xShadowx>
ksp runs off 3 parts basicly 1) cfg files do the real 'what am i?' 2) models+texture (mu and dds files) give said things a physical existance, ie the engine model 3) plugins (dll file) add function such as life support modules, engine modules, wheels, etc
<Lothsahn>
OH! okay. So the cfg says that ModuleAnimateGeneric is linked to the module with a gui name of Reverse Thruat
<Lothsahn>
Thrust*
<xShadowx>
MAF is the module
<xShadowx>
MAG*
<xShadowx>
said module is on part, saying "ok this part has an animation, and i control it'
<xShadowx>
similarly ModuleEngines is saying "this part is an engine, i control the engine stuff"
<Lothsahn>
Gotcha. Thanks! So I see how the GUI is defined.... But what actually reverses the thrust in the cfg? How does it alter the transforms?
<xShadowx>
MAG has an animation, animationName = TF2ThrustReverser, the module plays the animation, wether it be forwqard, reverse, etc
<xShadowx>
said animatiomn flips thrust vector
ferram4_ has quit [Read error: Connection reset by peer]
<xShadowx>
none of this you really need to know though :P as was said above just have LMP goto part > find anim module > hook into event, should cover it
<Lothsahn>
Where is MAG defined? I don't see it in the cfgs
ferram4 has joined #kspmodding
<xShadowx>
ModuleAnimateGeneric
<xShadowx>
i got tired of typin long names -.-
<Lothsahn>
Once I hook into it, I still have to know what to call on the other client...
<Lothsahn>
I know. Where is ModuleAnimateGeneric defined?
<Lothsahn>
Be happy... I'm typing on a phone. :-p
<xShadowx>
code wise? in assembly-csharp.dll
<xShadowx>
KSP namespace
<Lothsahn>
Oh the TF2ThrustReverser method is defined in one of the .mu files in the parts folder?
<Lothsahn>
So it's part specific?
<xShadowx>
as for 'what to set' you can go a few ways, onmoving could call the ToggleAction method on the other client, or force set the anim state, etc
<xShadowx>
TF2ThrustReverser is name of the animation
<xShadowx>
mu is just model + animation
<xShadowx>
you want to grab the ModuleAnimateGeneric on the other client, and manipulate from there
<Lothsahn>
Ok. So if I find the corresponding part in the other client, I can just call the start animation or toggle action method or whatever inside the module animate generic... And then it will not only animare the look of the part, but it will reverse the trust Factor
<Lothsahn>
Thrust vector*
<xShadowx>
no clue if the part "visually animates", many parts just move hidden transforms that you dont see do anything :P unfamiliar with that specific part
<xShadowx>
but basicly ya
<Lothsahn>
I'll try that. Gee whiz this would be so much easier if they gave us the source...
<Lothsahn>
Will sign NDA!
* xShadowx
coughs and hides his ILSpy
<xShadowx>
ILSpy shows all the source, officially you'll disappear into a dark hole if you mention it to squad, unofficially i dont think they give a fuck as long as you dont mention it
<xShadowx>
so no forums / kspo
<Lothsahn>
Dark hole... LOL
<xShadowx>
so anyways, that should be enough to help you :P
<xShadowx>
have fun :)
<xShadowx>
dont forget to deliver your first born
<Lothsahn>
Yeah. That gets me unstuck for this. Figuring out FlightIntegrator is 10x worse
<Lothsahn>
Still can't figure why setting the vessel position is off by up to 50m...