• How to discover the player type

    1
    0 Votes
    1 Posts
    186 Views
    No one has replied
  • Advanced hotkeys

    3
    0 Votes
    3 Posts
    324 Views
    FreadyFishF
    Update: Instead of assigning keys to actions, you will assign actions to keys. As well as the context conditionals. Obviously there are many things missing here, but I think something like this is how it must be. Let me know if you see a better solution, before I get too far down the line You select the key to edit, and scroll the list to the left and to find and add actions from there. About the IF, ELSE IF, ELSE - its not super clean, and might be a bit unfamiliar for non-programmers. At first I wanted to have tabs or something to seperate the contexts, but I realize that the order matters, as a unit can be part of two contexts. So I see no other way than to specify this in each key, then perhaps add a filter to show only those with a certain conditional. This list will be very long, so the main issue I see is how to find what you're looking for, and to understand what it does (especially when importing someone elses preset). Actions can be modified (or even added from scratch as ConExecutable code). For example you might want to add "+inview" to a select, which would give you only units currently on screen. This gives a high degree of freedom for those who understands coding without having to make a mod just for adding simple commands. This is of course optional. I will aim to make it simple and clean, and those more advanced parts will be accessable from a drop down menu or something. The goal is to make it accessible to everyone. [image: 1720460705952-advanced-hotkeys.jpg] PS: @Nomander Thanks for the feedback, I'm in there time to time trying to get familiar. Will try to stay in line. Still wonder though about how to do this so that the team is happy about the functionality as well, not just code.
  • Can someone tell me what going wrong here?

    13
    0 Votes
    13 Posts
    338 Views
    R
    @sheikah After hours of tinkering... Success! function GetTruncatedNumber02(num, dp) local pwr = math.pow(10, dp) num = math.floor(num * pwr) WARN(' pwr: ', pwr,' num', num,' num / pwr: ', num / pwr) local result = num / pwr local fmtStr = string.format('%%0.%sf',dp) number = string.format(fmtStr, result) return number end Results Math Truncate: 18.3671875 Decimals given, 1, 2, 3 Decimal: 1 pwr: 10 num 183 num / pwr: 18.299999237061 Output one after string filter: 18.3 Decimal: 2 pwr: 100 num 1836 num / pwr: 18.360000610352 Output two after string filter: 18.36 Decimal: 3 pwr: 1000 num 18367 num / pwr: 18.367000579834 Output three after string filter: 18.367 Ended up combining a few methods to get this result. Not sure how it would behave with negative values but thats for tomorrow. (tired) Resin
  • Predator Camouflage

    11
    4 Votes
    11 Posts
    386 Views
    R
    Made some improvements to the Terrain Camo. It now has a phase out effect before the units takes on the mesh of the nearby trees.
  • Stoping a units movement without altering the command que

    9
    0 Votes
    9 Posts
    238 Views
    R
    Ok correction.... Performing self:GetNavigator():AbortMove() before the Warp, not afterwards is whats required. Not seen it fail yet but I may need to script in a function to remove it from under the ground, should it get stuck.
  • Problem destroying an entity I've created

    4
    0 Votes
    4 Posts
    110 Views
    R
    @jip Originally i was using... self.CloakEntity = self:ForkThread(CreateCloakedEntity) Uploaded V8 and it will include this unit... URA0206 Cybran Vampire
  • Economy problem

    3
    0 Votes
    3 Posts
    138 Views
    JipJ
    @resin_smoker said in Economy problem: Or rather I flaw in the game design that has persisted for years. Such that the game can't handle a unit with two economy draws. You're right - it was known from the start too. Extractors have the same problem, and it is why this code exists even in the Steam distribution.
  • Anti-Missile Systems and veterancy

    1
    0 Votes
    1 Posts
    84 Views
    No one has replied
  • Need a second set of eyes as I'm having a issue resolving a trashbag

    2
    1 Votes
    2 Posts
    132 Views
    R
    Figured it out... Looks like something wasn't liking my use of BeamExhaustEffectsBag to store the emitters used for the afterburner effects. Dropping the Bag for locals, solved the issue completely.
  • Quick AI brain question

    7
    0 Votes
    7 Posts
    196 Views
    maudlin27M
    @resin_smoker The ones I'm aware of for weapons are :GetCurrentTarget() - returns the unit, if there is a unit being targeted :GetCurrentTargetPos() - returns the target, i.e. for ground attack targets (I've not tested to see all the cases in which this triggers, e.g. if it will return a value for a unit target's position) :WeaponHasTarget() - I've not used this one myself but I'd noted it down for reference when I was looking at how to get weapon target information with weapons being cycled through with something like: for iWeapon, oWeapon in oUnit.WeaponInstances do if oWeapon.GetCurrentTarget then local oCurTarget = oWeapon:GetCurrentTarget() if oCurTarget then ‘Have a target for the weapon end end end You can also use the Navigator object to get the current target position of a unit, e.g.: oUnit:GetNavigator():GetCurrentTargetPos() - This isn’t just a move order target – e.g. if the unit is building something, it returns the target of that building I found it unreliable, and made a note when I tested that with attack-move orders although I’ve not tested it extensively to confirm, it appeared that giving an attack-move order to a unit that caused that unit to then stop and attack a target, would result in the navigator position being that unit’s position. There's also a :GetGoalPos() function (which I think is based off the navigator as well) You can also use oUnit:GetFocusUnit() (which works e.g. in the case of a building a unit, I've not checked if it also works in the case of an attack order) Another one is oUnit:GetGuardedUnit() I've not tested this one but presume it works with the guard order. My rough notes on these and other commands are in section 5 of the AI development guide (linked to from the FAF wiki https://wiki.faforever.com/en/Development/AI/AI-Modding) although I don't think they'll add much more than what's here, other than you can look at e.g. unit.lua in the FAF Git as various comments have been added documenting functions available for units (and similarly with other files) which might provide further alternatives. You could also look into oUnit:GetCommandQueue() and analysing this - there might be documentation on this in the FAF repo as from memory some of the devs were able to figure out how to interpret the results of this (but it's not something I needed to look into beyond checking if a unit's command queue was empty as for my AI I track the orders given to each AI unit anyway which I rely on)
  • RangeCategory

    3
    1 Votes
    3 Posts
    151 Views
    R
    @jip Sweet, thank you!
  • Error running OnDamage script in Entity

    14
    0 Votes
    14 Posts
    510 Views
    R
    @rama but that's an assumption unless the log supports it.
  • Blast from the past, Cybran Vulcanizer!

    10
    3 Votes
    10 Posts
    372 Views
    R
    @noble_ice 4DFAF or just look up the mod by author name Resin_Smoker or resin. Choose the mod date thats most recent, 24 June 2024.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • Completely customizable hotkeys mod

    14
    5 Votes
    14 Posts
    927 Views
    FreadyFishF
    @ctrl-k Hey, want to get your thoughts on some further ideas here. I'm thinking to create a dialog, possibly opened from a new button in the default hotkeys page. From there I imagine a set of tabs for the different contexts, like for engineers or factories selected. In each tab it's possible to create commands for that context, even chain link several commands to run in sequence (for example: select all TML + Group scatter + enter launch mode). In the end you can create a set of finely tuned hotkeys from all possible default hotkeys commands. As the next step i imagine an import function where users can share their hotkeys either for all or specific contexts. Maybe someone likes my engineer hotkeys, and your factory hotkeys - should be possible to mix. When importing it would be nice to be able to convert between different keyboard layouts (languages) so it gets the same placement. I think it will be an awesome project, worthy of integration. It would be great to get your help. You in on giving it a try?
  • How to add Phase shields to a unit and create custom unit meshes

    13
    2 Votes
    13 Posts
    359 Views
    JipJ
    The reason I was asking is because ideally, when you're done with your current goals, it would turn into something such as this: https://github.com/FAForever/fa-total-mayhem Specifically the license here is what matters. It does not have to be MIT, but at least permissive enough to allow the community to (help) maintain the mod when you decide to move on again. At the moment we have some struggles with various well known mod packs - we can't make certain game changes because it would break them. And as we are unable to contact the authors we can also not get the permission and/or a license to setup a Github repository and maintain them. As a result we did not make those game changes. We're lucky that you got back here and started contributing again with your mod. We have much trouble contacting the original authors simply because all we usually have is a nickname and there's no way to verify that a person with a similar nickname is the original author. Which makes it all difficult
  • 0 Votes
    6 Posts
    250 Views
    R
    It's working...
  • AddKills() not so strait forward apparently

    9
    0 Votes
    9 Posts
    235 Views
    R
    @Jip Thanks m8! Here's the progress on the unit in question: https://youtu.be/nk8EvZLw7JE Units transition from Air to Land (and back) should appear fairly seamless. Only thing I've not been able to do is have the unit auto-selected, if it was previously selected before the transformation. DMS had a few handy functions for this that I've not been able to figure out thus far. Side note: I've been playing around with the idea (again) of having the Flying-walker just be an air unit. Then just manipulating the flight parameters to fake it walking. While I know this is possible, i do recall there being the issue where the air unit would tumble over the ground from playing bumper cars with the terrain. While also being able to scale shear cliffs in a very unorthodox fashion. Simply put, the pathing for air units is pretty much direct, while the land / sea units have to "think" their way around obstacles. This was fun back in the day when we were 1st messing around with the hologram units, while attempting to come up with ways to limit the overhead from the unit pathing.
  • Question about HideBone(bone, affect children)

    9
    0 Votes
    9 Posts
    507 Views
    R
    Uploaded the files to the Client for those that would like to see how it works. [image: 1718624220715-f8cf0d3d-b6c6-4d18-9da4-0a4a7ee0e877-image.png]
  • Been a (long) while since i last modeled anything...

    12
    0 Votes
    12 Posts
    716 Views
    R
    @cdrmv The link for the SCMTOOL doesn't show a function to allow for download. (Yes I'm logged in) Edit: NM, I found it... they changed a few things since last i used any of this.