Accueil Crush your enemies... and create an EMPIRE!!! Space Empires V -- BUY NOW!!!

Connexion utilisateur

  • Créer un nouveau compte
  • Demander un nouveau mot de passe

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • agrégateur de nouvelles

Rechercher

Qui est en ligne

Il y a actuellement 5 utilisateurs et 130 invités en ligne.

Utilisateurs en ligne

  • GambitUK
  • Randallw
  • crazydog
  • Roxton
  • evilhamburger

Languages

  • English English
  • French French

Parcourir les archives

« September 2008  
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
Accueil » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

Possible logic error...

Soumis par Gideon le Sam, 2007-12-01 18:39 SE:V MODs

I may have found a bit of a logic error in the way the AI gives orders to ships with regards to them joining fleets.

‹ Ordnance... Modding Mounts - The best way to balance Small & Cheap vs Large & Expensive ships? ›
» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.

Re: Possible logic error...

Soumis par Brad le Dim, 2007-12-02 03:40

You need to use use ampersand-gt-semicolon instead of a > sign, ie html code. Maybe something in the input format button below might do something, dunno, never tried it.

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Re: Possible logic error...

Soumis par Gideon le Dim, 2007-12-02 12:09
This is from stock Scrip_AI_Orders_Ships.txt. From the function Send_Ship_To_Join_Fleet:
if (Sys_Is_Empire_Fleet_Waiting_For_Ships(sys_long_Player_ID, fleet_id)) then
        if (not Is_Enemy_Present_At_Location(fleet_sys_loc, fleet_sect_loc)) then
          set this_dist := Sys_Get_Hex_Distance_Between_Sectors(sys_long_Player_ID, ship_sys_loc, ship_sect_loc, fleet_sys_loc, fleet_sect_loc)
          if (this_dist < min_dist) then
            set min_dist := this_dist
            set move_sys_loc := fleet_sys_loc
            set move_sect_loc := fleet_sect_loc
            set move_fleet_id := fleet_id
          endif
        endif
      endif
...
    call Sys_Give_Space_Object_Order_MoveTo(ship_id, move_sys_loc, move_sect_loc)
    call Sys_Give_Space_Object_Order_Join_Fleet(ship_id, move_fleet_id, task_force_id, task_force_role)
...
From the function Give_Specific_Fleet_Orders:

  if (not orders_given) then
    if (ships_joining_this_fleet > 0) and (ship_count <= (ships_per_fleet * 0.50)) then
      call Sys_Set_Empire_Fleet_Waiting_For_Ships(sys_long_Player_ID, fleet_id, TRUE)
      set orders_given := TRUE
    endif
  endif
Now check my logic on this (I could be wrong) but the way I read this is: Join this fleet only if this fleet is waiting for ships. Wait for ships only if a ship wants to join this fleet. In other words, they are joining only if something is waiting, but something is waiting only if something is joining. So it never happens...the AI never sends ships to joing existing fleets. Shouldn't it be:
  if (not orders_given) then
    if (ships_joining_this_fleet > 0) or (ship_count <= (ships_per_fleet * 0.50)) then
      call Sys_Set_Empire_Fleet_Waiting_For_Ships(sys_long_Player_ID, fleet_id, TRUE)
      set orders_given := TRUE
    endif
  endif
If I'm right, that little change could help the AI a bit.
» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Re: Possible logic error...

Soumis par Gideon le Dim, 2007-12-02 12:10

Fixed, and a big thank-you to Brand for pointing that out.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Captain Kwok
Mod Designer

Re: Possible logic error...

Soumis par Captain Kwok le Dim, 2007-12-02 15:48

I believe a new fleet or fleet without a minimum number of ships will is set to wait for ships, which in turn will call for ships to join the fleet.


Space Empires Depot | SE:V Balance Mod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Re: Possible logic error...

Soumis par Gideon le Dim, 2007-12-02 19:15

Captain Kwok wrote:
I believe a new fleet or fleet without a minimum number of ships will is set to wait for ships, which in turn will call for ships to join the fleet.


Space Empires Depot | SE:V Balance Mod

New fleets are set to wait for ships.

Existing fleets follow the code I posted above.

Additional:

Existing fleets use lng_AI_Available_Fleet_Ships_Count to determine how big it should be. That variable has its value reduced by the number of explorers and surveyors, but seems to never be set to a value above zero before this is done (at least, not that I could find). So, fleets never think they have too few ships.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Captain Kwok
Mod Designer

Re: Possible logic error...

Soumis par Captain Kwok le Dim, 2007-12-02 22:45

There's a small section in Script_AI_List that adds up all the valid ship types for fleets and sets that variable to a value.


Space Empires Depot | SE:V Balance Mod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Re: Possible logic error...

Soumis par Gideon le Dim, 2007-12-02 23:31

Captain Kwok wrote:
There's a small section in Script_AI_List that adds up all the valid ship types for fleets and sets that variable to a value.


Weird...my scripts seem to be missing that. At least, the ones I've been modding. I'll have to double check the current stock versions (the ones I've been modding date from a while ago).

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Re: Possible logic error...

Soumis par Gideon le Dim, 2007-12-02 23:59

Yep, found the lines for the ship tally in stock. I've imported them in to my mod.

However, the above logic error still exists in stock.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.

Now on STEAM

Now on STEAM!Space Empires V via STEAMSpace Empires IV via STEAMSTEAM online by Valve Corporation

Contenu populaire

Aujourd'hui :

  • Ship Capture Issues
  • Space Empires V
  • Hows the current AI?
  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • SE5 Multimedia Pack

Depuis toujours :

  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Space Empires V
  • Gritty Galaxy Fleet Clash
  • Damn Dirty Bugs/Annoyances
  • Space Empires V: General Thoughts, Observations, and Suggestions

Dernier accès :

  • Anyone try TCP/IP with 1.58?
  • Error with Empire creation
  • Emissive Armor and Shard Cannons: BM 1.08
  • SE VI Compatible with DirectX 10.x & Vista 32/64 ?
  • Patch 1.44 Deutsch
(c) Strategy First, Inc. All rights reserved.