Author Topic: Send Notification  (Read 3827 times)

0 Members and 1 Guest are viewing this topic.

May 20, 2017, 12:33:26 PM
Read 3827 times

vitafit

  • *
  • Information
  • Member
  • Posts: 7
    • View Profile
Hi,

can i send a notification to the bar on top?
//Edit: Even the sample mod is not working / not getting activated with Alpha 9?

Thanks.
Kind regards
« Last Edit: May 20, 2017, 04:55:50 PM by vitafit »

May 20, 2017, 04:56:53 PM
Reply #1

Trawis

  • *
  • Information
  • Member
  • Posts: 16
    • View Profile
Code: [Select]
HUD.Instance.AddPopupMessage("This message will be shown", "Cogs", "", 0, 0, 0, 0, 1);

May 20, 2017, 07:11:02 PM
Reply #2

vitafit

  • *
  • Information
  • Member
  • Posts: 7
    • View Profile
Thanks, is there a documention yet?
It is so hard to find anything...

For exmaple i am trying to generate a Player Server Deal i know there are serveral classes for that but i have no idea what i need to implement it...
« Last Edit: May 21, 2017, 08:38:00 AM by vitafit »

May 21, 2017, 10:11:42 AM
Reply #3

Trawis

  • *
  • Information
  • Member
  • Posts: 16
    • View Profile
Thanks, is there a documention yet?
It is so hard to find anything...

For exmaple i am trying to generate a Player Server Deal i know there are serveral classes for that but i have no idea what i need to implement it...

No documentation yet, you want to generate some random Hosting deal or?

May 21, 2017, 10:13:41 AM
Reply #4

vitafit

  • *
  • Information
  • Member
  • Posts: 7
    • View Profile
Yep, that is exactly what i am desperately trying to do since many hours... :(

To get more into detail:
Code: [Select]
SoftwareProduct prio = GameSettings.Instance.simulation.GetProduct((uint)1217, false);
ServerDeal deal = new ServerDeal(prio);
deal.HandleLoad(90);

Company meine = GameSettings.Instance.MyCompany;
deal.Accept(meine);

Working fine so far, but the server typ is always unsupport so i have to assign a new server every time in order to get it to work....?
« Last Edit: May 21, 2017, 01:05:05 PM by vitafit »

May 21, 2017, 05:24:59 PM
Reply #5

Trawis

  • *
  • Information
  • Member
  • Posts: 16
    • View Profile
That's weird, can you assign server via code?

May 21, 2017, 06:00:35 PM
Reply #6

vitafit

  • *
  • Information
  • Member
  • Posts: 7
    • View Profile
That's weird, can you assign server via code?
I found part of the issue: I accepted the offer via code, if i accept it from the deals window it is fine. Now the only thing left: How can i adjust the bandwith? I would like to add a product with a specific bandwith amount.

May 21, 2017, 06:20:27 PM
Reply #7

Trawis

  • *
  • Information
  • Member
  • Posts: 16
    • View Profile
Maybe this will work with some modifications?!
Code: [Select]
SoftwareProduct prod = new SoftwareProduct();
prod.Server = "ServerName";
prod.ServerReq = 0.9f;

May 21, 2017, 06:56:35 PM
Reply #8

vitafit

  • *
  • Information
  • Member
  • Posts: 7
    • View Profile
Maybe this will work with some modifications?!
Code: [Select]
SoftwareProduct prod = new SoftwareProduct();
prod.Server = "ServerName";
prod.ServerReq = 0.9f;
This seems to do the trick... we need a documentation sooo bad...
What is the difference between?:
HandleLoad
Userbase
ServerReq

Do i also need to adjust the internet bill or will it change it self?
« Last Edit: May 21, 2017, 06:59:12 PM by vitafit »

May 21, 2017, 07:10:39 PM
Reply #9

Trawis

  • *
  • Information
  • Member
  • Posts: 16
    • View Profile
HandleLoad - well I don't know what this exactly is haha
Userbase - How many active users product have
ServerReq - how much will product load server, 0.9 = 90%

Well you will need to adjust the bill I think because it will act like a normal product.

May 21, 2017, 07:13:14 PM
Reply #10

vitafit

  • *
  • Information
  • Member
  • Posts: 7
    • View Profile
HandleLoad - well I don't know what this exactly is haha
Userbase - How many active users product have
ServerReq - how much will product load server, 0.9 = 90%

Well you will need to adjust the bill I think because it will act like a normal product.
Thanks! Let's hope khornel will read this and realize how bad we need a documentation  :'(

May 21, 2017, 09:00:58 PM
Reply #11

Trawis

  • *
  • Information
  • Member
  • Posts: 16
    • View Profile
I'll tell him that suggestion :)
P.S. Are you good in C#? You can answer me via PM

May 22, 2017, 06:45:14 AM
Reply #12

vitafit

  • *
  • Information
  • Member
  • Posts: 7
    • View Profile
I'll tell him that suggestion :)
P.S. Are you good in C#? You can answer me via PM
Thanks! Check your PM :-)
« Last Edit: May 22, 2017, 07:00:02 AM by vitafit »