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

User login

  • Create new account
  • Request new password

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • news aggregator

Search

Who's online

There are currently 3 users and 134 guests online.

Online users

  • Shrike
  • ForesterSOF
  • p3 d

Languages

  • English English
  • French French

Browse archives

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

Help needed: Sys_Get_Datafile_Field_Value_As_String

iou0's picture
Submitted by iou0 on Fri, 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 ›
» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Thy Reaper's picture
Mod Designer

Re: Help needed: Sys_Get_Datafile_Field_Value_As_String

Submitted by Thy Reaper on Sun, 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

» login or register to post comments
iou0's picture

Re: Help needed: Sys_Get_Datafile_Field_Value_As_String

Submitted by iou0 on Thu, 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.

» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Now on STEAM

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

Popular content

Today's:

  • Defence vs. Attack and other Combat related questions...
  • Sphärenwelt
  • Why Retrofit is limited to +50% per order?
  • Babylon 5 Wars SEV Mod Update
  • Balance Mod Neutral Races

All time:

  • 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

Last viewed:

  • New Mod
  • Launching Units in Simultaneous Games
  • Emissive Armor Bugged In Patch 1.33
  • I can't help myself ( just needed an ear for a rant, no offense to anyone )
  • AI for custom races
(c) Strategy First, Inc. All rights reserved.