Mod question

Polaris Sector is a sci-fi 4X game that offers exciting exploration, detailed resource management, unique research mechanics and intense tactical combat.
Post Reply
eltharion
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 11
Joined: Thu Sep 04, 2014 10:56 am

Mod question

Post by eltharion »

I tried to create a new component "Point Zero Reactor".
hereinafter the code I used, but without success, the game does not start.

I also tried changing the number of decks for a spaceship, but the editor does not show
the relative layer button (I created another layer image and added in shipbody.all file).

I think I put everything in the right place, but I may have made mistakes.
if you can give me some suggestions, I'd be grateful.

Two additional questions ... :D
Is there a way to set the resources and their amount on a Homeworld?
We can change the number of structures that can be built on a planet?

Thank You ;)

************************************************************************************
"HIDDEN_HUM_GENERATOR" Lang "Point Zero Reactor"
"HIDDEN_HUM_GENERATOR_DESCR" A Zero Point Generator, often abbreviated ZPG, is an incredibly long-lived power source of great magnitude.
Utilizing Zero point energy, it is the cleanest energy source in the known universe. Given its vast power generation capabilities and small size."

this.TechnologyPath add next "HIDDEN_HUM_GENERATOR"

[TECHNOLOGY] "HIDDEN_HUM_GENERATOR"
Hidden
Info "HIDDEN_HUM_GENERATOR"
FullDescription "HIDDEN_HUM_GENERATOR_DESCR"
Image "Images/Sciences/powers.png"
Parents
"CHEMISTRY" 0
"MATHEMATICS" 0
"PHYSICS" 0

[GENERATOR] "Point Zero generator"
POWER_CONS 3000
WEIGHT 1400
FOR_CLASS SmallShip
MOVIE "Items/SCGNYD.idx" BIG
PICTURE "Items/SCGNYD_top.png" BIG
TECH "HIDDEN_HUM_GENERATOR"
CELLS_TYPE Standard
RES_REQ Metals 0.1 Organics 0.05 Radioactives 0.15 Prod 0.1 END_REQ


[GENERATOR] "Point Zero generator"
POWER_CONS 60000
WEIGHT 35000
FOR_CLASS BigShip
MOVIE "Items/SCGNYD.idx" BIG
PICTURE "Items/SCGNYD_top_cl2.png" BIG
TECH "HIDDEN_HUM_GENERATOR"
CELLS_TYPE Standard
RES_REQ Metals 0.5 Organics 0.25 Radioactives 0.75 Prod 1 END_REQ


[GENERATOR] "Point Zero generator"
POWER_CONS 90000
WEIGHT 40000
FOR_CLASS GiantShip
MOVIE "Items/SCGNYD.idx" BIG
PICTURE "Items/SCGNYD_top_cl2.png" BIG
TECH "HIDDEN_HUM_GENERATOR"
CELLS_TYPE Standard
RES_REQ Metals 2.0 Organics 1.0 Radioactives 3.0 Prod 2 END_REQ


[GENERATOR] "Point Zero generator" COPY_FROM_CLASS GiantShip
FOR_CLASS OrbitalStation
PICTURE "Items/SCGNYD_top_cl2.png" BIG

[GENERATOR] "Point Zero generator" COPY_FROM_CLASS BigShip
FOR_CLASS Freighter
************************************************************************************
Firefox440
2nd Lieutenant - Panzer IVF/2
2nd Lieutenant - Panzer IVF/2
Posts: 684
Joined: Fri Jun 06, 2014 11:58 pm
Contact:

Re: Mod question

Post by Firefox440 »

First I recomend you delete everything in the folder My Games\Polaris Sector, the files at this folder can crash the game after some edits.

Second, at My Games\Polaris Sector, you will find a text file named fatal, if there are missing files, it will tell you about them.

Third. Why have you made the tech as hidden? I am not sure if it will run. For the record, there are many things which I do not know. However, I have played a bit with these files.

About the additional questions. Check PLANTYPE.INI.
eltharion
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 11
Joined: Thu Sep 04, 2014 10:56 am

Re: Mod question

Post by eltharion »

First, thanks for the reply.
Surely I will wipe the folder "My Games \ Polaris Sector"

The Fatal file contains:
Error parsing file: Expected Img, found own_weightError file parsing: Expected Img, found own_weightError file parsing: Expected Img, found own_weightError reading Equipment Data File.

I will try to figure out what could be the problem with the image.

With regard to creating the technology as "Hidden" I read it as necessary to
to a technology that is "limited" to one species.


********************************************************************************************************************
Can I add a technology only for one single race?

Yes, you can add a race-specific technology but it's a bit tricky. First you need to add a hidden
technology, like Those That regulates production (look to the end of tech_t. All files), then make
this tech to parent for all race-specific techs. Then grant That hidden tech to a race in diplomacy
files.

Where are the files diplomacy?

These are .a files Add call UFGrantTechnology (this.raceID, "techname") Into the Register phrase
needed for the race. >techname would be a technology you wish to grant ..
Each race has its own .a file (like r_sha.a) where You Should look for >something like CODE:
SELECT ALL
phrase InitTechPath ()
:: InitTechPath ()
end phrase

the line
this.TechnologyPath add next "HIDDEN_HUM_GENERATOR"

*******************************************************************************************************************
I inserted in "r_hum.a" file
phrase InitTechPath ()
:: InitTechPath ()
this.TechnologyPath add next "HIDDEN_HUM_GENERATOR"
end phrase
Surely i will check the PLANTYPE.INI files, even if I thought more to be included in it "r_hum.a" file to change the creation of the "home world".

But I do not find any.

The function:

call function UFSetPlanet Resource (Planet Handle, resIron, number)

provides only a portion of initial resources, not a type of resource with a specific yield.
Last edited by eltharion on Mon Mar 28, 2016 2:41 pm, edited 4 times in total.
Firefox440
2nd Lieutenant - Panzer IVF/2
2nd Lieutenant - Panzer IVF/2
Posts: 684
Joined: Fri Jun 06, 2014 11:58 pm
Contact:

Re: Mod question

Post by Firefox440 »

The tech limited to one race is one of the things which I could not run in the last version.

The guide which you have read, it was created by me with answers from Ufnv but it is far from be perfect or finished.;)
Error parsing file: Expected Img, found own_weightError file parsing: Expected Img, found own_weightError file parsing: Expected Img, found own_weightError reading Equipment Data File.
I do not know what is this error. But remember delete the fatal file with each new test. It can be a problem from before.
eltharion
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 11
Joined: Thu Sep 04, 2014 10:56 am

Re: Mod question

Post by eltharion »

Sorry I inherited my answer.
I did not notice that you had written. :oops:

in r_hum.a I modified the function for creating the "home world"

phrase CreateHomeworld(PlanetHandle)
// ::CreateHomeworld(PlanetHandle)
call UFSetECOPlanetBuildingCount(PlanetHandle, bldColonialComplex, 1)
call UFSetECOPlanetBuildingCount(PlanetHandle, bldFarm, 29)
call UFSetECOPlanetBuildingCount(PlanetHandle, bldScienceCenter, 4)
call UFSetECOPlanetMaxBuildingCount(PlanetHandle, bldScienceCenter, 60)
call UFSetECOPlanetBuildingCount(PlanetHandle, bldPlanetaryFactory, 3)
call UFSetECOPlanetBuildingCount(PlanetHandle, bldOrbitalFactory, 1)
call UFSetECOPlanetBuildingCount(PlanetHandle, bldTransfer, 1)
call UFSetECOPlanetBuildingCount(PlanetHandle, bldReidComplex, 1)
call UFSetECOPlanetBuildingCount(PlanetHandle, bldIronSh, 1)
call UFSetECOPlanetBuildingCount(PlanetHandle, bldOrganicSh, 1)
call UFSetECOPlanetBuildingCount(PlanetHandle, bldPlutoniumSh, 1)
// call UFSetECOPlanetBuildingCount(PlanetHandle, bldSpacePort, 1)
call UFSetECOPlanetBuildingCount(PlanetHandle, bldRestrictBirth, 1)
call UFSetPlanetPopulation(PlanetHandle,number)

call UFSetPlanetResource(PlanetHandle, resBur, number)
call UFSetPlanetResource(PlanetHandle, resReid, number)
call UFSetPlanetResource(PlanetHandle, resIron, number)
call UFSetPlanetResource(PlanetHandle, resOrgan, number)
call UFSetPlanetResource(PlanetHandle, resPlut, number)
call UFSetPlanetResource(PlanetHandle, resFood, number)

call UFSetPlanetAutomationDirect(PlanetHandle, abBalanced)

call UFMarkPlanetAsHomeworld(PlanetHandle, this.raceID)

local string NewName

if (HAS this ColonyNames)
if (this.ColonyNames size > 0)
NewName = this.ColonyNames get(1)
this.ColonyNames delete all (NewName)
call UFSetPlanetName(PlanetHandle, NewName)
end if
end if

end phrase


Create a world with the accommodations listed
that is called with the first name of the list of planets for Race.

It provides the "global" resources as listed (cap 100M).
Firefox440
2nd Lieutenant - Panzer IVF/2
2nd Lieutenant - Panzer IVF/2
Posts: 684
Joined: Fri Jun 06, 2014 11:58 pm
Contact:

Re: Mod question

Post by Firefox440 »

And...........have you any question?
eltharion
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 11
Joined: Thu Sep 04, 2014 10:56 am

Re: Mod question

Post by eltharion »

Yes, thank you ;)
As for now there is no way to assign an exclusive search for a race, I would like to know if is possible to speed
up the construction of ships and structures (without of course having to pump the productive structures of the planet).
Many games use the money to do (purchases production), but in Polaris Sector does not seem possible to me ...
I'm doing wrong?

It would be my intention to start all races in a very large galaxy (900 stars).
But I would like to give each one a more solid basis for starting (perhaps two or three planets).
I have no idea how to do (Some experiments have not led me to nothing).

I also want to understand how to set the mineral resources of a world and the respective quality.
Could you help me about it?
Firefox440
2nd Lieutenant - Panzer IVF/2
2nd Lieutenant - Panzer IVF/2
Posts: 684
Joined: Fri Jun 06, 2014 11:58 pm
Contact:

Re: Mod question

Post by Firefox440 »

You can edit the factories and orbital shipyars for to increase the Produces Prod 1.000000 but with the ships in the BldInfo folder, you change in the ShipType.all the StdBuildMultiplier
StdSupportMultiplier values. The first is the multiplier from build and the second the multiplier from maintenance.
But I would like to give each one a more solid basis for starting (perhaps two or three planets).
Check the moddings corner about how edit a scenary.
I also want to understand how to set the mineral resources of a world and the respective quality.
PLANTYPE.INI but very probably you can not make one exact thing at 100% because many things are random.
eltharion
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 11
Joined: Thu Sep 04, 2014 10:56 am

Re: Mod question

Post by eltharion »

Thank you... i will try it ;)
Ufnv
SoftWarWare
SoftWarWare
Posts: 725
Joined: Sun Oct 25, 2015 9:19 pm

Re: Mod question

Post by Ufnv »

eltharion wrote:First, thanks for the reply.
The Fatal file contains:
Error parsing file: Expected Img, found own_weightError file parsing: Expected Img, found own_weightError file parsing: Expected Img, found own_weightError reading Equipment Data File.

I will try to figure out what could be the problem with the image.

This means the error is in ShipBody.all file

Looks like you changed the number of decks for some ship body, but did not alter the deck images list...
eltharion
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 11
Joined: Thu Sep 04, 2014 10:56 am

Re: Mod question

Post by eltharion »

Thanks for the answer

I tried to change the number of decks for a corvette from 2 to 3, but I'm sure I have also
created an image layer to the added level.

Perhaps the error is related to a previous attempt (in which I had not yet put the layer).

However both, with the layer that without ... the number of decks remains unchanged.
Perhaps in this release we can not change it.

[SHIP_BODY]
   Type Corvette
   Race Hum
   Size 30 60
   Decks 3
     Img "Ships / Top / n64_0.png" BIG
     Img "Ships / Top / n64_1.png" BIG
     Img "Ships / Top / n64_2.png" BIG
   own_weight 0.000000
   hullMult 1.000000
   weightMult 0.750000
   own_hull 1200
   HasTurretsAtTopDeck
   cell_info_path "z5.cli"
   game_resolution 512,384
   post_shift 0085
// Game_center 320 240
   ellipse_ratio 0.500000
   BattleMov
     NULL
     NULL
     NULL
     NULL
     NULL
     "Ships / n64_turn.idx"
     "Ships / n64_turn_256.idx"
     "Ships / n64_turn_128.idx"
Firefox440
2nd Lieutenant - Panzer IVF/2
2nd Lieutenant - Panzer IVF/2
Posts: 684
Joined: Fri Jun 06, 2014 11:58 pm
Contact:

Re: Mod question

Post by Firefox440 »

The best option is to use a new name for the cells.
eltharion
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 11
Joined: Thu Sep 04, 2014 10:56 am

Re: Mod question

Post by eltharion »

Ok, i will try :D
Ufnv
SoftWarWare
SoftWarWare
Posts: 725
Joined: Sun Oct 25, 2015 9:19 pm

Re: Mod question

Post by Ufnv »

eltharion wrote:Ok, i will try :D
or you can send me the modified files, so I can check what is going on
Post Reply

Return to “Polaris Sector”