Is a new research field possible?

n00b needs help

I have looked everywhere here  :(

I got the Window\ResearchScreen and also added three new strings (updated count)

StringInfo

  • ID "IDS_TECH_RESEARCHFIELD_UNIVERSE" 
  • Value "Universe"

 

  • PlayerPhase
  • PlayerPsi
  • PlayerTech

added researchScreenData field

 Universe 

     blockCount 1 (next 5 lines same as artifacts for now)

DEV CHOKES HERE. Why is numResearchFields below researchScreenData and I don't see a count for researchScreenData

numResearchFields 7     (found out 7 is max when I tried 8)

  • field"IDS_TECH_RESEARCHFIELD_COMBAT"
  • field "IDS_TECH_RESEARCHFIELD_DEFENSE"
  • field "IDS_TECH_RESEARCHFIELD_EMPIRE"
  • field "IDS_TECH_RESEARCHFIELD_DIPLOMACY"
  • field "IDS_TECH_RESEARCHFIELD_ARTIFACT"
  • field "IDS_TECH_RESEARCHFIELD_FLEET"
  • field "IDS_TECH_RESEARCHFIELD_UNIVERSE"

 

Please help or point to a post.

 

6,674 views 16 replies
Reply #1 Top

WTH, kept on getting a damn commercial page.

Reply #2 Top

I'm pretty sure the researchScreenData is hard coded to the enumerations: Combat, Defense, NonCombat, Diplomacy, Artifact, and Fleet.

I've ran into a similar problem trying to add new pacts (https://forums.sinsofasolarempire.com/385836)

 

Reply #3 Top

Quoting ZombiesRus5, reply 2
I'm pretty sure the researchScreenData is hard coded to the enumerations: Combat, Defense, NonCombat, Diplomacy, Artifact, and Fleet.

I've ran into a similar problem trying to add new pacts (https://forums.sinsofasolarempire.com/385836)

 
End of ZombiesRus5's quote

Yeah, I think it is. I believe the number of tabs on a research screen is hard coded as well. The Defense and Diplomacy tabs both have a bunch of unused space, and I was trying to add new "boxes" of research to them, but it doesn't work. You can make the existing ones bigger, though.

Reply #4 Top

Yes I did find a few old old posts on making them bigger. I remember I did have a mod that added 1 though. I will try and find it.

Thanks 4 the replies.  :D

Reply #5 Top

Well, I was thinking about adding new blocks to the diplomacy tab for my technology pacts mini-mod and remembered this thread. It's really dissapointing they hardcoded the defense and diplomacy tree this way. I'm not sure exactly why they thought this was a good idea.

I will have to make due with merely increasing the size of the Diplomacy block which won't be as appealing.

Reply #6 Top

I've only given this a cursory glance because I'm far from this point in my mod; however, I came to the not-quite-100% certain conclusion that it's possible to create or remove blocks from the research screens.  It's all in the player files and the Window files.  I believe it will take a great deal more work than you might have imagined, and barring any weird coding stipulations that lock that blockCount line to a certain number, it should be quite possible.  

You'd have to adjust the Window entries plus correlating textures, and then make the necessary additions in the player entity files.  I think it will work, but, as I said, I haven't devoted my complete attention to coming up with a solution and can't say for sure. 

Reply #7 Top

I don't necessarily disagree with you that it might be possible... but for the life of me I can't find any reference in any window file that might help in this regard. I've done plenty with the player entity files in a different mod and in this attempt and much like myfist0 to no avail.

ResearchSubject has invalid ResearchWindow block: RESEARCHSUBJECT_PACTACCESS_PHASEGATE
End of quote

Is what the dev.exe complains about if you set a ResearchSubject to block 1 in the Diplomacy tree.

Reply #8 Top

I'll keep this in the back of my mind.  I still haven't replaced all necessary files since I got a new hard drive, the reference files included.  Once I'm back up to 100% I'll search through those folders to see what I can come up with.

Reply #9 Top

Actually, now that I'm looking at the reference files, your error doesn't make sense to me.  It's referring to an entire research block, but then points to a subject as the block error.  Would you mind posting the relevant sections of the files you're working with?   

Reply #10 Top

Sure thing...

RESEARCHSUBJECT_PACTACCESS_PHASEGATE.entity:

...
researchWindowLocation
 block 1
 pos [ 4 , 6 ]
ResearchField "Diplomacy"
...

End of quote

So in the Combat or NonCombat tree's this would put the research subject icon in the 2nd window in column 4, row 6. The dev.exe doesn't like block 1 for the Diplomacy research field.

Reply #11 Top

Oh rotten hell  x_x

I was referring to adding a hole new button under Artifacts and now you are telling me I can't even add a new block. Someone deserves an ass woopin'.

Reply #12 Top

I know this seems like such an obvious question, but I'm going to ask it anyway.  Have you actually created the second block in the Diplomacy research field through the player entity, Window, and Brush files?  If so, can I see those files?

Reply #13 Top

I know this seems like such an obvious question, but I'm going to ask it anyway. Have you actually created the second block in the Diplomacy research field through the player entity, Window, and Brush files? If so, can I see those files?
End of quote

I'd really love to know what window file you believe contains block information. Brush files would have no bearing on this. And of course we have added a second block to the player entity file.

Here is the section in ResearchScreen.window for the diplomacyContentWindow. I don't see anything in regards to blocks outside of the player files. Additionally, this section looks identical to the Combat and NonCombat portions.

diplomacyContentWindow
 blockWindowSharedDef
  titleArea [18, 20, 200, 30]
  titleFontId "Label"
   buttonTopLeftOffset [184, 8]
    buttonSize [50 , 36]
    buttonSpacing [14, 10]
  buttonSpecificDef 
   barsOffsetFromTop 4
   barsWidthModifier -5
   backdrop "ResearchWindowButtonBackdrop"
   overlay ""
   maxLevelOverlay "ResearchWindowButtonMaxLevelOverlay"  
  isBackdropStretched TRUE

End of quote
 

Reply #14 Top

You cannot add another research subject. This is quite obviously hard-coded as shown by the unique identifier for each subject in ResearchScreen.window.

Reply #15 Top

Now that I've had a chance to look at the window files, you're absolutely correct.  There doesn't appear to be anything to change there, so I apologize for that.

I did test out adding a second block to the Diplomacy screen sans research.  As I'm sure you noticed, the game doesn't throw out an error with just a block added.  Unfortunately, it didn't actually add the block to the screen either.  I also tried pasting one of the other research category blocks into the Diplomacy field.  In all cases, only the first block shows up. 

It's very possible that the number of blocks is hardcoded, but I'm not ready to give up yet.  If we can add a block into the player entity file and the dev exe doesn't spit it back out, it gives me hope that we're just missing something.  I'll keep at it. 

Reply #16 Top

It's very possible that the number of blocks is hardcoded, but I'm not ready to give up yet.  If we can add a block into the player entity file and the dev exe doesn't spit it back out, it gives me hope that we're just missing something.  I'll keep at it. 
End of quote

I just wasted the morning trying to get in another block myself and failed. It only allows for that block to be made larger. I moved the RESEARCHSUBJECT_ABILITYACCESS_PROBE.entity to the Defense window after enlarging the defense window.

researchWindowLocation
      block 0
      pos [ 0 , 5 ]
 ResearchField "Defense"

This does not even work on-the-fly and had to restart the DEV to see any changes so I did try to make the new blocks and restart every time. A real Pain-in-the-ASS Devs.