Author Topic: C# Suggestions  (Read 304910 times)

0 Members and 2 Guests are viewing this topic.

Offline Elouda

  • Gold Supporter
  • Lieutenant
  • *****
  • Posts: 196
  • Thanked: 22 times
  • 2024 Supporter 2024 Supporter : Supporter of the forum for 2024
    2021 Supporter 2021 Supporter :
    2020 Supporter 2020 Supporter :
Re: C# Suggestions
« Reply #210 on: April 17, 2020, 11:51:20 AM »
Could the retirements of officers assigned to Admin Commands (which dont get assigned by the auto-assign) be made more discrete in the event log, and also have them break the autorun? I seem to often find these go months without anyone in them because the officer retirements/updates are so common.
 

Offline AlStar

  • Lt. Commander
  • ********
  • Posts: 215
  • Thanked: 168 times
Re: C# Suggestions
« Reply #211 on: April 17, 2020, 02:09:02 PM »
I'd be extremely surprised if I'm the first one to suggest this, but in the off chance that I am:

Given the number of bug reports and otherwise confused players (myself included!) I think that any ship that has either Cryogenic Transport modules or Cargo Hold modules but does not have at least one Cargo Shuttle Bay should trigger a warning in the ship designer saying "this ship will only be able to load/unload from planets or ships that have the needed cargo transfer equipment." (Or something similar.)
 

Offline Inglonias (OP)

  • Lieutenant
  • *******
  • I
  • Posts: 170
  • Thanked: 69 times
Re: C# Suggestions
« Reply #212 on: April 17, 2020, 04:21:38 PM »
It would be nice if saving the game showed up in the event log so we can avoid this situation
 

Offline Raaaak

  • Leading Rate
  • *
  • R
  • Posts: 14
  • Thanked: 4 times
Re: C# Suggestions
« Reply #213 on: April 17, 2020, 05:17:41 PM »
Since it is now a known bug that will not be fixed I'll post it as a suggestion instead.

Please consider supporting language settings which use comma as a decimal separator.  A big part of what I was looking forward to with the C# version was not having to mess around with my Windows settings to get the game to run.

It should (dangerous word to use as a developer I know) not be more difficult than either outputting hardcoded numbers to input fields by standard string conversions instead of string constants.  (I. e.  InputBox. Text = (0. 1). ToString() instead of InputBox. Text = "0. 1")

Or less ideally, but a lot less work for you, overriding the culture settings of the program.
Code: [Select]
var ci = new System. Globalization. CultureInfo("en-UK");
System. Globalization. CultureInfo. DefaultThreadCurrentCulture = ci;
System. Globalization. CultureInfo. CurrentUICulture = ci;
as the first few lines of code on app startup.
This would also fix any problems with inconsistent date formats.


(Anti hyperlink function is messing up my code, please remove any extra spaces before reading)

And a question as well. Are we still supposed to use this thread now that there is an entire suggestions board?
« Last Edit: April 17, 2020, 05:30:21 PM by Raaaak »
 
The following users thanked this post: Alsadius

Offline ReviewDude01

  • Petty Officer
  • **
  • R
  • Posts: 22
  • Thanked: 2 times
Re: C# Suggestions
« Reply #214 on: April 17, 2020, 05:29:27 PM »
Suggestion: make this program work properly for any or at least: resolutions of 1366 X 766 or more

This is a C# script for Unity engine called uGUI tools made by Senshi

It makes every unity interface UI piece including its childrens fully rescalable with any resolution. (use the first option Anchors to Corners)
I have tested it, it works.
I have configured it.
I do not know what program are you using but Im posting it in case that it might be useful to you.
If yes please read below:

using UnityEditor;
using UnityEngine;

public class uGUITools : MonoBehaviour {

   [MenuItem("uGUI/Anchors to Corners %1")]
   static void AnchorsToCorners()
   {
      foreach (Transform trans in Selection.transforms)
      {
         RectTransform t = trans as RectTransform;
         RectTransform pt = trans.parent as RectTransform;

         if(t == null || pt == null) return;

         Vector2 newAnchorsMin = new Vector2(t.anchorMin.x + t.offsetMin.x / pt.rect.width,
            t.anchorMin.y + t.offsetMin.y / pt.rect.height);
         Vector2 newAnchorsMax = new Vector2(t.anchorMax.x + t.offsetMax.x / pt.rect.width,
            t.anchorMax.y + t.offsetMax.y / pt.rect.height);

         t.anchorMin = newAnchorsMin;
         t.anchorMax = newAnchorsMax;
         t.offsetMin = t.offsetMax = new Vector2(0, 0);
      }
   }

   [MenuItem("uGUI/Corners to Anchors %]")]
   static void CornersToAnchors(){
      RectTransform t = Selection.activeTransform as RectTransform;

      if(t == null) return;

      t.offsetMin = t.offsetMax = new Vector2(0, 0);
   }
}

this version needs Unity Editor, click on an UI piece and use Editor->AnchorsToCorners to make it work.

Here is a configured "function" version that can be applied to any UI piece created by script at runtime. :

void RuntimeAnchorsToCorners(GameObject InputGo)
   {
      
      Transform tempTransform = InputGo.transform;
      RectTransform t = tempTransform as RectTransform;
      RectTransform pt = tempTransform.parent as RectTransform;

         if(t == null || pt == null) return;

         Vector2 newAnchorsMin = new Vector2(t.anchorMin.x + t.offsetMin.x / pt.rect.width,
            t.anchorMin.y + t.offsetMin.y / pt.rect.height);
         Vector2 newAnchorsMax = new Vector2(t.anchorMax.x + t.offsetMax.x / pt.rect.width,
            t.anchorMax.y + t.offsetMax.y / pt.rect.height);

         t.anchorMin = newAnchorsMin;
         t.anchorMax = newAnchorsMax;
         t.offsetMin = t.offsetMax = new Vector2(0, 0);

   }

an example calling this function:

GameObject /* or var */ aNewButtonCreatedFromScript = .... // code to create a new button or an UI piece;

RuntimeAnchorsToCorners (aNewButtonCreatedFromScript); // needed for every UI piece

Notes for converting it to another engine:
: Vector2 is basically an unity engine (float,float) "struct".
Anchors are points representing UI element positions in 2d screen.

I believe that RectTransform is roughly represented as Top,Left,Right,Bottom properties in 2D.
https://docs.unity3d.com/ScriptReference/RectTransform.html

If you think that this solution might be viable I might dig more data about how to convert it for Aurora C.

 

Offline Desdinova

  • Lt. Commander
  • ********
  • D
  • Posts: 283
  • Thanked: 285 times
Re: C# Suggestions
« Reply #215 on: April 17, 2020, 05:33:29 PM »
Steve's not using Unity. The whole thing is written as a regular C# application using Windows Forms to draw the GUI.
 

Offline Coleslaw

  • I got the Versacis on, stop playin'!
  • Warrant Officer, Class 2
  • ****
  • Posts: 61
  • Thanked: 57 times
Re: C# Suggestions
« Reply #216 on: April 17, 2020, 06:19:55 PM »
Not sure if this has already been discussed, and I'm pretty sure it's not a bug, just one of those things that had to be left out, but could/will we have the opportunity to "Repeat Orders X Times" when ordering fleets? That function was super helpful when trying to transfer exact quantities of stuff to populations, but as is I have to sort of guess the right amount with the "Repeat Orders" option instead, and using it in that way means I can only transfer installations in squares of 2.
 

Offline DFNewb

  • Captain
  • **********
  • D
  • Posts: 508
  • Thanked: 103 times
Re: C# Suggestions
« Reply #217 on: April 17, 2020, 06:28:25 PM »
Some sort of way for fighters to work without needing ground based forces (FFD in this case).
 

Offline mtm84

  • Sub-Lieutenant
  • ******
  • m
  • Posts: 131
  • Thanked: 36 times
Re: C# Suggestions
« Reply #218 on: April 17, 2020, 06:33:02 PM »
Per Steve: “ You can't resize window. Required resolution is 1440 x 900. There is no reduced height option. This will not change any time soon.”
 

Offline alex_brunius

  • Vice Admiral
  • **********
  • Posts: 1302
  • Thanked: 197 times
Re: C# Suggestions
« Reply #219 on: April 17, 2020, 06:51:30 PM »
I think it feels pretty odd that fast firing AA and Autocannon weapons are larger than the corresponding Anti-Vehicle weapons, at least when it comes to the tanks/vehicle mounted weapons.

In my fantasy worlds at least I tend to associate Anti-Vehicle and higher penetration with some of the largest and heaviest guns, whatever technology or Sci-Fi setting I may be using as a basis ( although I can see how bombardment weaponry could be of equal size or larger than anti vehicle so that I'm fine with ).

So my suggestion is the AA & Autocannon should be a bit smaller or Anti Vehicle a bit larger in size to feel right ( which might require rebalancing other stats they have )
 

Offline Erik L

  • Administrator
  • Admiral of the Fleet
  • *****
  • Posts: 5670
  • Thanked: 390 times
  • Forum Admin
  • Discord Username: icehawke
Re: C# Suggestions
« Reply #220 on: April 17, 2020, 10:39:06 PM »
Ability to automatically add a prefix/suffix to a ship if such a thing is decided on after ships of that class are built already.

Offline Froggiest1982

  • Gold Supporter
  • Vice Admiral
  • *****
  • F
  • Posts: 1381
  • Thanked: 644 times
  • 2023 Supporter 2023 Supporter : Supporter of the forum in 2023
    2024 Supporter 2024 Supporter : Supporter of the forum for 2024
    Gold Supporter Gold Supporter :
Re: C# Suggestions
« Reply #221 on: April 17, 2020, 10:41:19 PM »
Make planes part of ground unit design and keep fighters as Orbital elements only with bombardment capability (same as spaceships)

Offline DFNewb

  • Captain
  • **********
  • D
  • Posts: 508
  • Thanked: 103 times
Re: C# Suggestions
« Reply #222 on: April 17, 2020, 10:50:04 PM »
I think it feels pretty odd that fast firing AA and Autocannon weapons are larger than the corresponding Anti-Vehicle weapons, at least when it comes to the tanks/vehicle mounted weapons.

In my fantasy worlds at least I tend to associate Anti-Vehicle and higher penetration with some of the largest and heaviest guns, whatever technology or Sci-Fi setting I may be using as a basis ( although I can see how bombardment weaponry could be of equal size or larger than anti vehicle so that I'm fine with ).

So my suggestion is the AA & Autocannon should be a bit smaller or Anti Vehicle a bit larger in size to feel right ( which might require rebalancing other stats they have )

In my opinion autocannons seem useless. I am not sure when you would want them, maybe if you want to make armies of just type of unit instead of combined arms? Still wouldn't be good tho.
 

Offline Alsadius

  • Lt. Commander
  • ********
  • Posts: 215
  • Thanked: 149 times
Re: C# Suggestions
« Reply #223 on: April 17, 2020, 11:37:11 PM »
We currently have the "Temp[late] as Text" button for ground units, which is nice, but it gives no details on the makeup of the elements. When we post our OOBs on the design forum, it's hard to tell what the "Tank" someone's using is. Can we get some unit info into that text?

Make planes part of ground unit design and keep fighters as Orbital elements only with bombardment capability (same as spaceships)

I really love the fighter pod concept, tbh. I wouldn't mind fighters as ground units, if there was some mechanical role they could play, but it's primarily a space game, and finding a nice clean way for space fighters to participate in the new ground combat system is really good to see.

In my opinion autocannons seem useless. I am not sure when you would want them, maybe if you want to make armies of just type of unit instead of combined arms? Still wouldn't be good tho.

The best use for them I can find is that they cause fairly low levels of collateral damage for their firepower, since they're high AP and low damage. Given that collateral damage is proportional to damage cubed, this makes a big difference. But I don't think it's something many will care about, and their stats are very weak.

The suggestion I made pre-launch was to make LACs available on infantry, give MACs a fourth shot, and HACs five shots (but up them from 72 tons to 80). With other stats equal to what they are now, those are fairly balanced.

Offline DFNewb

  • Captain
  • **********
  • D
  • Posts: 508
  • Thanked: 103 times
Re: C# Suggestions
« Reply #224 on: April 17, 2020, 11:40:01 PM »
We currently have the "Temp[late] as Text" button for ground units, which is nice, but it gives no details on the makeup of the elements. When we post our OOBs on the design forum, it's hard to tell what the "Tank" someone's using is. Can we get some unit info into that text?

Would be nice if an auto-naming thing is added for units the same way it works for ship components. I wouldn't mind having it auto put in MedVehAT+AT or something by itself.