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

Utilisateurs en ligne

  • Santiago
  • ftarzanin
  • lookerbc
  • glockgemini

Languages

  • English English
  • French French

Parcourir les archives

« Juillet 2008  
Lu Ma Me Je Ve Sa Di
  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

Help needed: Sys_Get_Datafile_Field_Value_As_String

Image de iou0
Soumis par iou0 le Ven, 2007-03-09 15:34 SE:V MODs

Hi, there!

Can somebody help me with the Sys_Get_Datafile_Field_Value_As_String function?

How do I read records from a datafile using this function?

If I call

Sys_Get_Datafile_Field_Value_As_String(id, "System_Service")

I seem to get only the first field-entry as a return value, in this case "Crystalline Restructuring Plant".

My datafile contains something like this:

System_Service := Crystalline Restructuring Plant

System_Service := Death Shrine

System_Service := Energy Transmission Lens

System_Service := Events Predictor

System_Service := Fate Shrine

‹ AI stops putting a weapon on troop designs FQM Beta 7 ›
» 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.
Image de Thy Reaper
Mod Designer

Re: Help needed: Sys_Get_Datafile_Field_Value_As_String

Soumis par Thy Reaper le Dim, 2007-03-11 10:39

You can do that?

Hmm... I wish I'd noticed, that seems useful. The only problem I see is that the function doesn't take an 'n' value, so it stops when it finds the first System_Service entry. Try naming them System_Service1, System_Service2, etc, and when you call the function, append the number of the entry you're looking for.

-----
Space for rent - please contact owner

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

Re: Help needed: Sys_Get_Datafile_Field_Value_As_String

Soumis par iou0 le Jeu, 2007-03-15 04:25

Thank you for the reply. I already did try this, and it works fine. However, it is a bit cumbersome.

To be able to cut out the unnecessary duplicate system service facilities I wanted to create a mod that would send me a message saying something like:

"3 Urban Pacification centers in system Foo (planet 1, planet 5, panet 7)"

I got as far as the game sending me a message "3 Urban Pacification centers in system Foo", if there are more than one in the system. But it is very hard to determine on which planets the duplicate facilities are located.

I just came up with the idea of looping through the cargo of each stellar object in a system - but this takes too much time. You would have to create a loop for each player, each system, each planet in the system and each facility that performs a service to the whole system.

Since this was too much bother, I trashed the project.

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

  • I am so impressed!
  • Space Empires V 1.74
  • Neutral pack 1.10 released, now adds three neutral races.
  • Stuipd Question
  • Research By Percentage SUCKS

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 :

  • Praise to Malfador
  • Graphical text alignment - Planet Mood
  • Dark Nova 5 and "The Fighter Issue"
  • Propulsion?
  • Formulas - modding
(c) Strategy First, Inc. All rights reserved.