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 3 utilisateurs et 148 invités en ligne.

Utilisateurs en ligne

  • AndreyKl
  • Vince278
  • bauscho

Languages

  • English English
  • French French

Parcourir les archives

« December 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 31        
Accueil » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

Find specific facility type on planet

Soumis par jacob4408 le Mar, 2007-05-01 15:38 SE:V MODs

I'm adding some counter-intelligence options under the Intelligence attacks and all is well except for the last one. I'm trying to, in effect, have your intel agents destroy an intelligence center of the target empire. My methodology is to
1) randomly loop through enemy empire planets
2) randomly loop through facilities on that planet
3) if facility == intel then kill it
4) exit function

Steps 1 and 2 are fine but once I have the list of facility ids on a planet, I don't know how to determine which facilities are intel centers. Is there a sys function that returns type of facility if supplied with facility_id? Is there a function to destroy a facility by id? Is there a better way to do this? So far what I have is....

function Execute_Intel_Counter_Terminate returns boolean
params
src_plr: long
trg_plr: long
vars
colony_list: longlist
fac_ids: longlist
fac_levs: longlist
cur_col: long
num_cols: long
ret_val: long
ret_bool: boolean
num_facs: long
cur_fac: long
begin

// build list of all enemy colonies
set ret_val := Sys_Get_List_Of_Players_Colonies(trg_plr,colony_list)

// loop through colonies looking for intel
set num_cols := colony_list.count()
if (num_cols > 0) then
loop
// get facility info for current colony
set cur_col := Sys_Get_Random_Long(1, num_cols)
set ret_bool := Sys_Get_Space_Object_Cargo_List_Of_Facilities(cur_col,fac_ids,fac_levs)

// loop through facilities for this colony looking for intel
for cur_fac := 1 to fac_ids.count() do
// determine type of facility
// if it's intel kill it and exit out
exitwhen (TRUE)

endfor

call colony_list.delete(cur_col)
set num_cols := colony_list.count()

exitwhen (num_cols

‹ Idea : how to make Troops useful Quick Question About targeting New UnitTypes ›
» 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.
Mod Designer

Re: Find specific facility type on planet

Soumis par Gideon le Mar, 2007-05-01 20:31

Here is what I have so far:

cargo_ammount: long
cargo_index: long
this_cargo_id: long
this_facility_id: long
planet_id: long
building_destroyed: boolean

set cargo_ammount := Sys_Get_Space_Object_Cargo_Item_Count(planet_id)

set cargo_index := 0

loop
set cargo_index := cargo_index + 1
set this_cargo_id := Sys_Get_Space_Object_Cargo_Item_ID(planet_id, cargo_index)
if Sys_Get_Space_Object_Cargo_Item_Type(planet_id, this_cargo_id) = CARGO_ITEM_TYPE_FACILITY then
set this_facility_id := Sys_Get_Space_Object_Cargo_Item_Facility_ID(planet_id, this_cargo_id)
if (this_facility_id = Sys_Get_Best_Facility_With_Ability(target_player, "Point Generation - Intelligence")) then
// --- Destroy the cargo object.
set building_destroyed := TRUE
endif
endif
exitwhen (cargo_index >= cargo_ammount) or (building_destroyed)
endloop

Now for the problem:

I cannot find any way to delete or damage any singular cargo item. The closest I can get is Sys_Space_Object_Scrap_Cargo, but this returns resources to the owning player. I guess the sabotuers could deliver the resources as an apology...

Other than this, we can destroy all cargo on an object at once, or inflict damage to a planet. Either of those options are not discriminating enough to let you destroy a specific object.

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

Re: Find specific facility type on planet

Soumis par jacob4408 le Ven, 2007-05-04 11:29

Hmm, well if I have to go with scrap then I can live with target player getting some resources back. I'd be surprised if intel agents could so thoroughly destroy a facility as to leave nothing useful. If nothing else, the target empire could recycle the metal from the building! I'll play around with it some more. Thanks.

» 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 :

  • Research By Percentage SUCKS
  • Is the Patch Process Dead, and Other Thoughts...
  • Biggest game problem in the beginning
  • SEV 1.74 misc. Issues and Suggestions
  • Known SE5 v1.74 Bugs

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 :

  • NM
  • Space Empires V Demo Available for Download!!
  • How do you defend against Fighters?
  • Babylon 5 Space Empires V mod?
  • Decided Superiority II
(c) Strategy First, Inc. All rights reserved.