Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (OptimusPrime, AndrewAMD), 14,580 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Dynamic Resource folder #39118
01/11/05 08:26
01/11/05 08:26
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Not sure if a thing like that, but if not I think it's a very nice way to make your game extendable.

like the acknex_plugins folder, let us have a folder where we can place resources.
Then there should be a command to get all available resources + the included function... or maybe jsut a starter() or main() action inside the resource to get the extra resource "conencted" to the game?
What do you think about that?

Currently always some sort of patch is required if you want to include an addon level resource (unless you specified some resources that didn't exist at the beginning. But what's next when those "spare names" are all used up?)

Am I making sense here?

Re: Dynamic Resource folder [Re: FBL] #39119
01/12/05 01:07
01/12/05 01:07
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Managing a folder for resources is more difficult for inexperienced users, than using the [Add Script] button and the [Resources] window.

Re: Dynamic Resource folder [Re: jcl] #39120
01/12/05 02:11
01/12/05 02:11
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I'm thinking of the end user here

When releasing an addon it can be copied into the game folder and it will automatically be added to the game. Currently I have to deliver an update of the scripts of te original game as well.

Btw: Does add_resource() work from anywhere inside a function or so? Or does it behave just like the old resource statement?



Re: Dynamic Resource folder [Re: FBL] #39121
01/13/05 01:00
01/13/05 01:00
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Add_resource works from inside a function. Resources can be loaded this way, only problem is that they won't add new scripts or replace old scripts.

Re: Dynamic Resource folder [Re: jcl] #39122
01/13/05 02:10
01/13/05 02:10
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
That's bad news about the script, but other than that it's great. That definitely does help.

I think I mixed up a bit "resource" and "add_resource()". After thinking a bit more about it, it is clear that add_resource CAN'T add script at runtime. The manual isn't very clear at that point I think.

For what I want to do, I'll need an external resource manager I think. Should not be too much of a problem for me writing one.

Re: Dynamic Resource folder [Re: FBL] #39123
07/21/05 09:23
07/21/05 09:23
Joined: Oct 2004
Posts: 8
Istanbul-Turkiye
Dijipark Offline
Newbie
Dijipark  Offline
Newbie

Joined: Oct 2004
Posts: 8
Istanbul-Turkiye
I tried the add_resource but not work. What is the problem.
When i wrote the wrs path to top like

resource "some_resource.wrs"

it works fine.

but i want it to add with a condition like

if(a==1)
{
add_resource("some_resource_a.wrs");
}
else
{
add_resource("some_resource_b.wrs");
}

it does not work. I get error messages which the models in wrs cannot be find.

What is the problem?

Thank you...


www.dijipark.com Dijipark Software Istanbul Turkiye
Re: Dynamic Resource folder [Re: Dijipark] #39124
08/17/06 08:07
08/17/06 08:07
Joined: Jul 2006
Posts: 96
C
ChildeHarold Offline
Junior Member
ChildeHarold  Offline
Junior Member
C

Joined: Jul 2006
Posts: 96
I know it's an old thread, but I still face the problem Dijipark speaks about.

add_resource seems not to work dynamically. I tried it both from inside a dll as well as from a wdl function, but without success.

Re: Dynamic Resource folder [Re: ChildeHarold] #39125
08/17/06 16:01
08/17/06 16:01
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
The difference between add_resource and the resource statement is that the latter makes the resource available at compile time, while add_resource is for run time only. Hope this makes sense.

Re: Dynamic Resource folder [Re: jcl] #39126
08/17/06 16:23
08/17/06 16:23
Joined: Jul 2006
Posts: 96
C
ChildeHarold Offline
Junior Member
ChildeHarold  Offline
Junior Member
C

Joined: Jul 2006
Posts: 96
No, not all, since I referred explicitly to the

add_resource

command, stating that it does not do what it promises.
At least for me, since I haven't seen it working in runtime.

A reource which was in same folder and declared as

resource("some.wrs")

while the very same, tiggered by a function, in which a add_resource("some.wrs")
command was embedded, did not work. So I can just underline waht Dijipark said.

Last edited by ChildeHarold; 08/17/06 16:25.
Re: Dynamic Resource folder [Re: ChildeHarold] #39127
08/17/06 16:25
08/17/06 16:25
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Then I'm afraid I haven't understood your problem. Dijipark's issue was solved long ago, but can you tell me what you intend to do, and post the relevant code? Which engine version are you using?

Page 1 of 2 1 2

Moderated by  aztec, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1