Raised This Month: $32 Target: $400
 8% 

[H3L] Read from BSP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 11-02-2017 , 16:50   [H3L] Read from BSP
Reply With Quote #1

Hello. Can someone show me a good example of how can I read the line containing wad from a BSP file? It seems that using fopen and stuff, with feof, it will just read a very small part of the file due to unknown characters, like NULL etc. So, for example, if my bsp file contains this:

"wad" "\sierra\half-life\valve\halflife.wad;\sierra\half-life\tfc\tfc.wad;\sierra\half-life\valve\decals.wad"

I want it to read the whole line, and split each string by ; .
Thanks !
DarthMan is offline
hellmoss
Senior Member
Join Date: Oct 2009
Location: ZOMBIE PLAGUE
Old 11-05-2017 , 04:27   Re: [H3L] Read from BSP
Reply With Quote #2

.res generator

https://gamebanana.com/tools/4777


PS: drag and drop a .bsp into the resgen.exe and it will open generating your lines.

Last edited by hellmoss; 11-05-2017 at 04:28.
hellmoss is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 11-05-2017 , 09:25   Re: [H3L] Read from BSP
Reply With Quote #3

Quote:
Originally Posted by hellmoss View Post
.res generator

https://gamebanana.com/tools/4777


PS: drag and drop a .bsp into the resgen.exe and it will open generating your lines.
I know about res gen, but I dont want an app. hat is due to the fact that a source from where I dl maps it's rando, some of them ahve res files, others don't. It's better to have a res plug-in that automatically generates res files for maps that don't have it. There are some plug-ins of this kind already made but all of them are truly private. I tried to ask one of those who amde something like that but he didn't want to tell me a single thing, not even what module he used etc. Absolutely nothing. So for example if I dl a pack with 200 maps and only 100 of them have res files, it'll be stupid to have to spend hours for each map tog enerate the res file.

Last edited by DarthMan; 11-05-2017 at 09:26.
DarthMan is offline
hellmoss
Senior Member
Join Date: Oct 2009
Location: ZOMBIE PLAGUE
Old 11-05-2017 , 11:11   Re: [H3L] Read from BSP
Reply With Quote #4

You can also drag and drop multiple files in the generator window. How is the thing I gave you not the one you need? You're confusing.

Last edited by hellmoss; 11-05-2017 at 11:12.
hellmoss is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 11-05-2017 , 11:17   Re: [H3L] Read from BSP
Reply With Quote #5

Quote:
Originally Posted by hellmoss View Post
You can also drag and drop multiple files in the generator window. How is the thing I gave you not the one you need? You're confusing.
Well, i know, but for soem reason my resgen crashes if I had a lot of files. And why doing it with AMXX isn't a good idea? It's just like saying that AMXX is total bullshit becuz there's MetaMod and in that case AMXX means that it laods through MetaMod so the server will use mroe resources, and u are a bit limited on the stuff u can dow ith AMXX while with metaMod u can rly do anything that can be done. But that's not true, AMXX doesn't suck. If it did, why would I use it? Plus, AMXX has the orpheu and Rage module so now you can do pretty much everything with AMXX too.
DarthMan is offline
hellmoss
Senior Member
Join Date: Oct 2009
Location: ZOMBIE PLAGUE
Old 11-05-2017 , 11:58   Re: [H3L] Read from BSP
Reply With Quote #6

Still don't get what you want and what the problem is... You want a plugin to read from BSPs? How would you load many BSPs at once without changing the map to every single map at once?

Last edited by hellmoss; 11-05-2017 at 12:00.
hellmoss is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-05-2017 , 13:13   Re: [H3L] Read from BSP
Reply With Quote #7

It makes much more sense to do it to each map using ResGen when you download the map from the website. It is not necessary to do it in a plugin.
__________________
fysiks is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 11-05-2017 , 13:39   Re: [H3L] Read from BSP
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
It makes much more sense to do it to each map using ResGen when you download the map from the website. It is not necessary to do it in a plugin.
Yes, if i do it map by map it works fine. I want to do it with a plug-in btw, that's what I really want to do
DarthMan is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-05-2017 , 15:26   Re: [H3L] Read from BSP
Reply With Quote #9

Quote:
Originally Posted by DarthMan View Post
Yes, if i do it map by map it works fine. I want to do it with a plug-in btw, that's what I really want to do
I understand what you want which is why I posted what I did. You can certainly write your own plugin to do it or wait for someone to do it for you (you might be waiting a very long time because it's makes more sense to do it when you upload the map to your server).

The biggest problem with doing dynamically with a plugin is that you can never customize the files, ever (because the plugin will overwrite them). Also, there is an issue as to when you actually do all this. You would have to write the plugin to do it every time the map changes for EVERY map on the server. So, if you have 500 maps, it will take awhile to do it.
__________________

Last edited by fysiks; 11-05-2017 at 15:29.
fysiks is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-05-2017 , 19:10   Re: [H3L] Read from BSP
Reply With Quote #10

So far I remember RESgen is quite basic. I made this kind of plugins years ago (unfinished) to check map resources thoroughly, generating a proper report and res file and avoid potential crash when loaded. Parsing is easy but it's quite a lot of code since you need to parse everything (map sections, models, wad, etc.) and keep in mind a lot of things (fallback mod, separate model texture, external/internal textures, etc.). If I have time, will try to dig out this plugin from my computer and eventually redoing a simplified version of it.
__________________
Arkshine is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode